DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING
CS25CO1-COMPUTER PROGRAMMING: C
PART-A Two Marks Question:
Unit -I
1. What is an algorithm? Draw a flowchart and write pseudocode for the largest among
three numbers.
2. What is Pseudocode? Give rules for writing a Pseudocode.
3. Are comments are executable in C? Justify your answer.
4. What is a variable and constant in C?
5. What are reserved words? List any 10 reserved words.
6. Define Compilation and execution process.
7. What are formatted and unformatted input/output statements?
8. What are jumping statements? Give examples.
9. Differentiate between while and do-while loop.
Unit-II
1. What do you mean by function declaration (function prototype)?
2. Why do we need a function? How do you declare and define a function? Give syntax
with an example.
3. What are actual and formal parameters?
4. What is a recursive function? Give an example.
5. What is storage class? Explain the types.
6. What is scope and lifetime of variables?
Unit-III
1. Define an array. Write syntax for one- dimensional and two-dimensional array
declaration and initialization.
2. Difference between Array and Structure.
3. What are strings? What are the string library functions available in C?
4. What is a pointer? What are the operators used in pointers?
5. What is dynamic memory allocation?
Unit-IV
1. What is a structure? How do you define and initialize a structure?
2. What are enumerations? Give syntax with an example.
3. How do we access structure members in c?
4. What is the difference between Structure and Union?
5. What is Union? How do you define and initialize a union?
Unit-V
1. Why are files needed?
2. What are the types of files?
3. What are standard libraries available in c?
4. What are the operations performed in files?
5. How do you open a file? Give syntax.
6. What are built-in math functions available in C? Which header file provides them?
PART – B (Long Answer Questions)
1. What are the primitive datatypes available in C? Explain with an example
2. What are Arithmetic, Relational, Logical, Bitwise, Assignment, and Conditional
operators?
3. What are decision-making statements? Explain with an example.
4. What are looping statements? Explain with an example.
5. What is a user-defined function? Explain with an example.
6. What is the necessity of parameter passing? What the two types of doing that? Explain in
detail with an example.
7. What are the storage classes available in C? Explain them.
8. What is one–dimensional and multi-dimensional array. Give the declaration and
initialization syntax with example.
9. Explain the concept of array of pointers with example
10. What are string handling functions? Explain with example.
11. What is dynamic memory allocation? Explain various functions that are used for the
same with example.
12. What is structure? How it is declared and initialized? Explain it with syntax
13. What is an array of structures? Explain with an example of a student structure.
14. Write a C program for accessing structure member through pointer
15. What is a file? What are the file operations performed in C? Explain it with an example.
16. How errors are handled in C? Explain it with an example
17. What are user-defined header files? Explain the steps to create and use a user-defined
header file with a suitable example program.
PROGRAMMING QUESTIONS
1. Program to check whether a year is leap year or not.
2. Program to find sum of series.
3. Program to perform addition, subtraction, multiplication and division using functions.
4. Program for addition and multiplication of matrices.
5. Factorial using recursion and without recursion.
6. Fibonacci series using recursion.
7. Linear search and binary search program.
8. Selection sort.
9. Sum of array elements.
10. Employee structure program.
11. Student structure program.
12. Library structure program