0% found this document useful (0 votes)
12 views8 pages

C Programming Concepts and Exercises

The document contains a comprehensive set of short and essay answer questions related to the fundamentals of programming in C, organized into five units. Topics covered include flow charts, data types, control structures, arrays, pointers, functions, and file handling. Each unit contains both theoretical questions and practical programming tasks to enhance understanding of C programming concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views8 pages

C Programming Concepts and Exercises

The document contains a comprehensive set of short and essay answer questions related to the fundamentals of programming in C, organized into five units. Topics covered include flow charts, data types, control structures, arrays, pointers, functions, and file handling. Each unit contains both theoretical questions and practical programming tasks to enhance understanding of C programming concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

(IS 23) Introduction to Programming

Short Answer Questions

Unit-I

1. What is flow chart? Mention its significance.


2. List any two primitive data types in C.
3. Write the syntax of a simple C program.
4. List any two keywords in C and their purpose.
5. Define algorithm and list its characteristics.
6. Differentiate between variable and constant.
7. Write input and output statements with an example.
8. What is conditional operator? Write its syntax.
9. List the different symbols used in flow chart.
10. Define type conversion.

Unit-II

[Link] between while and do-while loops.


[Link] a flowchart for else-if ladder?
[Link] switch statement?
[Link] is the difference between break and continue statements.?
5. Write a C program to determine whether a number is even or odd using if – else.
6. What is the use of goto in C?
[Link] if-else statement syntax.
8. Write for loop syntax with an example.
[Link] while loop syntax.
10. Write the syntax of nested if.
UNIT-III

[Link] is an array?
2. Define array indexing.
3. What is a two-dimensional array?
4. Write the syntax for declaring an array.
5. What is a string in C?
6. What does strlwr() &strupr().
7. What is the purpose of strlen ()?
8. What does strcpy () do?
9. Write any two string handling functions.
10. What is the purpose of strrev ()?

UNIT-IV

[Link] is a pointer?
2. What is dereferencing?
3. Define address operator (&).
4. What is pointer arithmetic?
5. What is a structure?
6. What is a union?
7. What are enumerated data types?
8. Difference between structure and union.
9. What is a structure variable?
10. How do you access members of a structure?
UNIT-V

[Link] is a function?
2. Define function declaration.
3. What is a return type?
4. What are parameters?
5. Difference between local and global variables.
6. What is recursion?
7. Define storage classes.
8. What is file handling?
[Link] file accessing modes?
10. What is fprintf () used for?
(IS 23) Introduction to Programming

Essay Answer Questions


Unit-I

1(a) .Explain with an example program about the following operators in C.


(i)Bitwise operators (ii) Logical operators 5M

(b) What is a flow chart? Draw a flow chart to sum and average of three numbers. 5M

2.(a) Discuss the different types of C operators with examples 5M

(b) Discuss primitive data types in detail with suitable examples. 5M

3.(a) What is variable? How do you declare and initialize it? What are the rules for naming a
variable? 5M
(b) Explain the basic organization of a computer system with a neat diagram 5M

4.(a) What is an operator? Explain about arithmetic and relational operator. 5M


(b) Explain briefly about first and fourth generation computers 5M

5. (a) Write an algorithm to find the factorial of a given number. 5M


(b) What is typecasting? Explain its types with example programs 5M
Unit-II

1.(a) Discuss switch statement in detail with a suitable program. 5M

(b)Write a program using switch to perform a simple calculator operation 5M

2.(a) Explain the continue, usage of break and goto with examples 5M

(b) Write a program to print the Factorial program using a loop 5M

3.(a) Write a C program to find the sum of individual digits of a given number.

( Ex: INPUT: 123 OUTPUT:6) 5M

(b) Explain about switch statement in C? Write a C program to implement arithmetic operators in
C using switch case. 5M

4. (a) Write a c program to check whether a number is palindrome or not.(palindrome means


number and its reverse should be same). 5M

4.(b) What is the difference between while and do-while loops? Give example program for each

5M

5.(a) Discuss the syntax of the for loop statement with an example program. 5M

(b) Write a C program to generate Fibonacci series 5M


UNIT-III

1.(a) Explain one-dimensional arrays with examples. 5M

(b) Write a program to read and print an array of integers 5M

2. (a) Discuss two-dimensional arrays with sample programs. 5M

(b) Write a program to read and print an array of integers. 5M

3 (a) Explain string handling functions in detail. 5M

(b) Write a program for matrix addition or matrix multiplication. 5M

4. (a) Explain how to declare and initialize one dimensional and two dimensional arrays in C
with suitable examples. 5M

(b) Write a C program to add any two matrices. 5M

5.(a) How is array initialized? Write a program to read elements into an array and display them

5M

(b) Illustrate string handling functions with suitable examples. 5M

[Link] strrev(),strcpy(),strlwr(),strupr() functios with an example? 10M


UNIT-IV

1. (a) Explain pointers and pointer arithmetic with examples. 5M

(b) Write a program to store and display student details using structures. 5M

2. (a) What is a pointer? What is the purpose of using pointers? Discuss the pointer operators
with suitable examples. 5M

(b) Explain structures and unions with examples. 5M

3.(a) Explain enumerated data types with examples. 5M

(b) Define structure. How to declare structure variables? 5M

4.(a) Differentiate between structures and unions in C? 5M

(b) What is a pointer? Explain dereferencing and address operators in detail 5M

5.(a) What is a structure? How do you access the members of a structure? Write a program to
define a structure called Student with members:

 name (character array)


 roll_no (integer)
 marks (float)

Read the details of a student and display them. 5M

5.(b)What is a structure? How do we declare a structure? Write a C program to display structure


members. 5M
UNIT-V

1. (a) Explain function declaration, definition and function call with examples. 5M

(b) Discuss call by value and call by reference with examples. 5M

2.(a) Explain different storage classes available in C. 5M

(b) Explain file handling functions in detail with examples. 5M

3.(a) Define storage class and list its types? Differentiate between local and global values in
c?. 5M

(b) Develop a C program that demonstrates swapping of two variables using a function. Use call
by reference by passing pointers to the function. 5M

4. (a) Explain about various parameter passing techniques in functions in c with a program for
each. 5M

(b) Explain storage classes in C language in detail with suitable examples 5M

5.(a) Explain the call-by-value and call-by-reference parameter passing methods. 5M

(b) Discuss file opening modes with suitable examples. 5M

You might also like