Practice Set C Programming

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 3

Practice Set

One line question


What is c?
What is extended data type?
What is variable?
Define precedence and associativity.
Define iterative statement.
Define pointer.
Write about control entry loop and exit loop.
Define Program.

What is nested loop?

What is structure?

What is main difference between structure and union?

Write disadvantages of goto statement.

State three advantages of function?

What is mean by associativity?

Write a program to find largest between two numbers?

Fill in the blanks


1.The C language was originally developed from------------language.
2.C language was implemented in the year-----------
3.C language was implemented at the ------------ laboratories.
4.The UNIX operating system was written in------------ language.
5.A C program is basically a collection of-----------.
6.C language is well suited for------------programming.
7.A---------------- character instructs the computer to move the control to the next line.
8.C program execution begins from------------.
9.The operator “- -’’ is known as ------------ operator.
10.The operator “++’’ is known as -----------operator.
11.The operator “++’’ adds the value ------------ to the operand.
12.The operator “- -’’ subtracts the value ------------ From the operand.
13.The ------------ Is equivalent to a = a+1.
14.The ------------ is equivalent to a + =1.
15.The ------------ is equivalent to a = a-1.
16.The ----------- Is equivalent to a- = 1.
17.A______ is a variable that can hold the memory address of another variable
18.A______ variable points to another pointer
19. ______is a control statement which carries out set of statements any number of times.
20.DO..........LOOP has two terms...........and.........
21. The repetition of statements is known as...................
22. A..... is used for assigning the values in a program.
23...........execute atleast on time in a program
24..________is one of the decision-making statements which creates a true as well as false block of
statements.
25.In the switch-case statement,
________is used to mark the end of each case block.
26.Conditional operator is also called_________operator as it operates on three operands.
27.__________is the conditional statement which allows to choose from the number of alternatives.

28. ________ statement is also called ladder-if-else statement.

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

You might also like