Important Questions Unit Wise (1)
Important Questions Unit Wise (1)
Unit 2
1. Explain various operators used in C along with example.
2. What is operator precedence and associativity?
3. What are various data types available in C language? Explain with giving their memory requirements, keywords
and range.
4. What is type casting? Write difference between implicit and explicit type casting along with example.
5. Explain bitwise and ternary operators with example
6. What are the different conditional programming (if else, switch case), also write the limitations of switch case.
7. Differentiate between break and continue.
8. Differentiate between nested if and switch statement with suitable example.
9. What are various conditional statements available in C language? Explain with giving suitable example and their
syntax.
Unit 3
1. Define Function. What are the various types of functions?
2. What is prototype of function and what is the need of function.
3. Illustrate with proper syntax the exit control and entry control loop in 'C'
4. Differentiate between Actual Parameter and Formal Parameters.
5. What are various looping control structures available in C language? Explain Entry controlled and exit controlled
loops with giving their syntax and suitable example.
6. Difference between call by value and call by reference with example.
7. Define Recursion. Write program using recursive function to find factorial of a number?
8. What is the difference between while and do-while. Explain with an example.
Unit 4
1. What is array? Also explain its important properties. How we declare two dimensional arrays. How array
elements are stored in memory?
2. What is structure? Give its syntax and explain with an example.
3. What is Union? Give its syntax and explain with an example.
4. What do you mean by enum? How will you declare enum variable? Write a program to display month in a year
using enum.
5. Differentiate between structure and Union with example.
6. Difference between structure and array
7. Explain following string functions strlen() , strcpy() strcat(), strcmp(), strrev() with example .
8. What is the importance of NULL characters in string?
9. What do you understand by time complexity of algorithm?
Unit 5
1. What is FILE? Explain all modes of operations of file opening with example?
2. Explain any five function of file with syntax.
3. What is preprocessor? Explain various preprocessor directives.
4. What is string? Write any five built in functions for string manipulation. Write a user defined function to
calculate length of a string.
5. What are pointers? Why are they required? With reference to pointer define the work of & operator.
6. What is macro? Explain with the help of example how we define it and use it. What are the advantages of using
macro definitions in a program?
7. What Difference between function and macros.
8. What is significance of NULL character and EOF?
9. What is linked list Explain with example? Also write advantages and disadvantages of linked list.
10. What is the importance of dynamic memory allocation give one suitable example for it?
Important Programs
1. Write a program in C to check whether a given year is leap year or not?
2. Write a program using function to print n Fibonacci terms.
3. Write a menu driven program using switch case to add, subtract, multiply and divide two numbers.
4. WAP to find the roots of quadratic equation.
5. Write a program in c to check the given number is prime or not.
6. Write a program to find sum of all digits of a number.
7. Write a program to find reverse of a number.
8. Write a program to print all the Armstrong numbers between 1 to 1000.
9. Write a program in C to read two integers x and y and swap the contents of the two variables using call by
reference.
10. Write a program to add two matrices of order 3 * 3 and store the result in other matrix.
11. Write a program to multiply two matrices of order 3 * 3 and store the result in other matrix.
12. WAP for binary search and also discuss advantage over linear search?
13. Write a program in C to Search an element in an array using sequential/linear search.
14. Write a C program to count number of blank spaces, tabs, newline, from a file sample.txt
15. What is structure? Define a structure for a student having name, roll number and percentage. Write a program to
input the details for 10 students and print the details of those students who have scored more than 70% marks.
16. Write a program in C to find the maximum and minimum in an array.
17. Write a program to find the sum of diagonal elements of matrix of order M X N.
18. Write a program in C to copy the content of a given file say “abc.txt” to another file say “xyz.txt”
19. Write a program in C to sort the given data elements {15, 55, 45, 35, 11, 18} using bubble sort and also describe
the process of bubble sort?
20. Write a program in c to sort the given data elements {15, 55, 45, 35, 11, 18} using selection sort and also
describe the process of selection sort?