Programming_For_Problem_Solving_Suggestion
Programming_For_Problem_Solving_Suggestion
Suggestion
1. Explain the ternary operator with a proper example.
4. Write a program to find the largest number among three numbers using conditional
statements.
6. Describe two types of increment & decrement operators with proper coding
examples.
10. What is the difference between while and do-while loops? Give examples.
11. What are logical operators in C? Explain && , || , and ! with truth table and
examples.
12. Write a C program to check whether a number is even or odd using functions.
13. What are header files in C? Mention four common ones with their uses.
1
22
333
4444
55555
20. Write a function in C to sort an array in ascending order using the bubble sort
algorithm.
21. Write a C program to create a simple calculator using switch statement that performs
+, –, *, /.
22. Write a program in C to generate Fibonacci series up to n terms using loops and
functions.
23. Explain the use of dynamic memory allocation using malloc() and free() with example.
24. Define a structure with nested structure. Write a program to input and display data
using that.
25. Explain the difference between local and global variables with an example program.