Practice Set C Programming
Practice Set C Programming
What is structure?
29.The -----------operator can be used to determine the length of array and structures.
30. The -----------operator can be used to allocate memory space dynamically to variables during
Execution of a program.
List of Questions
1. Explain structure of c in detail.
2. Write notes of data type and explain their types wite example.
3. Explain operator in details.
4. Difference between precedence and associativity.
5. Explain pointer with suitable example.
6. Write a C program to find whether a given year is a leap year or not.
7. Write a C program to find the largest of three numbers.
8. Write a C program to calculate the root of a quadratic equation.
9. Write a C program to compute the sum of the first 10 natural numbers.
10. Write a program in C to display n terms of natural numbers and their sum.
11. Write a C program to display a pattern like a right angle triangle with a number.
12. Write a program in C to make such a pattern like a right angle triangle with a number
which will repeat a number in a row.
13. Write a program in C to make such a pattern like a right angle triangle with the
number increased by 1.
14. Write a C program to calculate the factorial of a given number.
15. Write a program in C to find the sum of the series [ 1-X^2/2!+X^4/4!- .........].
16. Write a program in C to display the n terms of a harmonic series and their sum.
1 + 1/2 + 1/3 + 1/4 + 1/5 ... 1/n terms
17. Enlist the features of C
18. Write short note on Input & Output functions used in C (i.e. print &scanf functions?
19. what is variable? What are the rules for defining variables?
20. Differentiate between local variable and global variable?
21. Differentiate between relational and logical operators used in C?
22. Explain printf() function with an example
23. Explain scanf() function with an example
24. Explain syntax and use of Do__While statement
25. Which looping statements does C provides?Explain any one.
26. Explain explain continue And break statements
27. Explain switch statement with its syntax and example.
28. What is Nested if else explain with an example?
29. Explain nested for loop with an example
30. What is array? How to declare array?Explain with suitable example.
31. Write a C Program to print all numbers between 1 to n divisible by 7
32. Write a C Program to find sum of 1 + 2 + 3 + ….. + n
33. Write a C Program to find sum of 2 + 4 + 6 + ….. + n
34. Write a C Program to find sum of 7 + 14 + 21 + ….. + n
35. Write a C Program to find sum of 1/1 + 1/2 + 1/3 + ….. + 1/n
36. Write a C Program to print 15 terms of 1 , 2 , 4, 7, 11, 16, …..
37. Write a C Program to print even and odd number from an array
38. Write a C Program to read character from keyboard and display message whether character
is alphabet , digit or special symbol 25. Write a C Program to read a string and count number
of vovels in it