C Programming – Complete Question Bank
Engineering First Semester (End Semester Exam)
UNIT 1: Introduction to C
1. Explain the features and applications of C programming language.
2. Describe the structure of a C program with an example.
3. Explain the compilation process of a C program.
4. What are keywords, identifiers, constants and variables?
5. Explain different data types in C.
6. Write short notes on tokens in C.
7. Explain formatted input and output functions.
UNIT 2: Operators and Control Statements
1. Explain different types of operators in C with examples.
2. What is operator precedence and associativity?
3. Explain if, if-else and nested if statements.
4. Explain switch statement with syntax and example.
5. Explain for, while and do-while loops.
6. Differentiate between while and do-while loop.
7. Explain break, continue and goto statements.
UNIT 3: Arrays and Strings
1. Explain one-dimensional and two-dimensional arrays.
2. Write a program to find sum and average of array elements.
3. Explain passing arrays to functions.
4. What are strings? Explain string handling functions.
5. Write a program to reverse a string.
6. Write a program to check palindrome string.
7. Differentiate between array and string.
UNIT 4: Functions and Storage Classes
1. Explain user-defined functions in C.
2. Differentiate between call by value and call by reference.
3. Explain recursion with an example.
4. What are storage classes? Explain all types.
5. Explain scope, lifetime and visibility of variables.
6. Write a program using recursive function.
UNIT 5: Pointers
1. Explain pointers with examples.
2. Write a program to swap two numbers using pointers.
3. Explain pointer arithmetic.
4. Explain array of pointers and pointer to array.
5. Write a program to find largest element using pointers.
6. Explain pointers and functions.
UNIT 6: Structures and Unions
1. Explain structures with syntax and example.
2. Differentiate between structure and union.
3. Write a program using array of structures.
4. Explain passing structure to functions.
5. What are typedef and enum?
UNIT 7: File Handling
1. Explain file handling in C.
2. Explain different file modes.
3. Write a program to copy content of one file to another.
4. Explain formatted and unformatted file I/O functions.
5. Write a program to count characters in a file.
UNIT 8: Dynamic Memory Allocation
1. Explain malloc(), calloc(), realloc() and free().
2. Write a program using dynamic memory allocation.
3. Differentiate between static and dynamic memory allocation.