MCQ for C prgramming
MCQ
1. Which of the following special symbol allowed in a variable name? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
2. How would you round off a value from 1.92 to 2.0? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
3. Which of the following is the correct order of evaluation for the below expression? z = x + y * z / 4 % 2 - 1 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
4. When we mention the prototype of a function? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
5. Which of the following is the correct usage of conditional operators used in C? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
6. Which of the
following are unary operators in C?
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
8. Which of the following cannot
be checked in a switch-case statement?
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
9. In C, if you pass an array as an argument to a function, what actually gets passed? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
10. Which bitwise operator is suitable for turning off a particular bit in a number? |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
11. Which bitwise operator is
suitable for turning on a particular bit in a number?
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
12. Which bitwise operator is
suitable for checking whether a particular bit is on or off?
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
13. The keyword used to transfer
control from a function back to the calling function is
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
14. Which of the following is not
a valid variable name declaration?
A. int __a3;
B. int __3a;
C. int __A3;
D. None of the mentioned
A. int __a3;
B. int __3a;
C. int __A3;
D. None of the mentioned
15. All keywords in C are in
A. LowerCase letters
B. UpperCase letters
C. CamelCase letters
D. None of the mentioned
A. LowerCase letters
B. UpperCase letters
C. CamelCase letters
D. None of the mentioned
16. What is
the size of an int data type?
A. 4 Bytes
B. 8 Bytes
C. Depends on the system/compiler
D. Cannot be determined
17. The character used to terminate a string in c is:
A. ' \n'
B. ' \0'
C. ' \a'
D. none of these
Comments
Post a Comment