C Question Bank
C Question Bank
MCQ(Type 1) Marks:- 1
1-Which of the following retains the information it’s storing when the power to the system is
turned off?
(A) CPU
(B) ROM
(C) RAM
(D) DIMM
2. Which of the following memories must be refreshed many times per second?
(A) Static RAM
(B) Dynamic RAM
(C) EPROM
(D) ROM
3. The octal number 645 in power of 8 is equal to
a) 450
b) 451
c) 421
d) 501
A] Keywords
B]Variables
C]Constants
A] 0 to 256
B] -32768 to +32767
C] -65536 to +65536
D] No specific range
A] 1 byte
B] 2 bytes
C] 4 bytes
D] 8 bytes
A] Assignment
B] Increment
C] Logical
D] Rational
A] Bitwise AND
B] Bitwise OR
C] Logical AND
D] Logical OR
A] ?
B] *
C] sizeof
D]^
A] (type)
B] cast()
C] //
D] “ “
A]typedef
B] const
C] near
D] complex
2. What is constant?
6. What is data type explain the any four data types used in C language?
7. Explain the difference between ‘=’ and ‘==’ operator explain with example?
9. Write short note on Input & Output functions used in C (i.e. printf &scanf functions?
3. Explain the difference between float, char and int data type with suitable example.
5. Write a program to read two floating point numbers. Add these numbers and assign
the result to an integer. Finally display the value of all the three variables.’
1. Which loop is most suitable to first perform the operation and then test the condition?
a) for loop
b) while loop
c) do-while loop
d) none of the mentioned
2. Which keyword can be used for coming out of recursion?
a) break
b) return
c) exit
d) Both break and return
3. Which of the following is an invalid if-else statement?
a) if (if (a == 1)){}
b) if (func1 (a)){}
c) if (a){}
d) if ((char) a){}
4. C supports how many basic looping constructs
A] 2
B] 3
C] 4
D] 6
5. Which of the following cannot be checked in a switch-case statement?
a)Character
b)integer
c)float,
d)enum
Short Question (Type 2): Marks:-2
1. What is nested loop?
2. What is use of if statement?
3. Write a syntax of while loop? Give Example.
4. What is do-while statement?
5. Write a syntax of for loop? Give Example.
4. Can we use a function as a parameter of another function? [ Eg: void wow(int func()) ].
a) Yes, and we can use the function value conveniently
b) Yes, but we call the function again to get the value, not as convenient as in using variable
c) No, C does not support it
d) This case is compiler dependent
5. The value obtained in the function is given back to main by using ________ keyword?
a) return
b) static
c) new
d) volatile
MCQ(Type 1) Marks:- 1