Principles of Programming using C (22POP13)
Question Bank
1. Define a computer. Differentiate between
i) data and information ii) primary memory and secondary memory.
2. Write a short note on the characteristics of a computer.
3. Explain the evolution of computers. Further, state how computers in one particular
generation are better than their predecessors.
4. Broadly classify computers based on their speed, the amount of data that they can hold,
and price.
5. Discuss the variants of microcomputers that are widely used today.
6. List and explain any 5 hardware components of a computer.
7. Explain how a CPU operates with a neat block diagram.
8. Describe the different phases of the software development life cycle.
9. Explain the following with an example for each.
i) Flowchart ii) Algorithm iii) Pseudocode
10. List and discuss the various kinds of errors which frequently occur in program.
11. List various operators used in C language.
12. Explain Logical operators and Relational operators.
13. What are decision control statements? Explain in detail.
14. Explain the importance of a switch case statement. In which situations is a switch case
desirable? Also give its limitations.
15. Explain the one way selection statement (if) in C language with syntax, flowchart and
example.
16. Explain the two way selection statements (if-else, nested if-else, cascaded if else) in C
language with syntax, flowchart and example.
17. Explain the switch statement with syntax and example.
18. Design and develop a C program to read a year as an input and find whether it is leap year
or not. Also consider end of the centuries.
19. Explain the different types of loops in C with syntax and example.
20. Write a C program to find whether the given number is even or odd.
21. How is comma operator useful in a for loop? Explain with the help of relevant examples.
22. Write a C program to swap two numbers using third variable.
23. With the help of an example explain the dangling if-else problem.
24. Write a C program for demonstration of simple calculator operation using switch case.
25. Explain the usefulness of default statement in switch case statement.
26. Give the points of similarity and differences between a while loop and a do-while loop.
27. Write a C program to find whether a given number is a leap year or not.
28. Change the following for loop into a while loop.
int i;
for (i=10;i>0;i++)
printf("%d", i);
29. Design and develop a C program to reverse of an integer number NUM and check
whether it is PALINDROME or NOT.
30. Write a c program that takes three coefficients (a, b, and c) of a Quadratic equation
(ax2+bx+c=0) as input and compute all possible roots for a given set of coefficients with
appropriate messages.