

MCQOPTIONS
Saved Bookmarks
This section includes 11 Mcqs, each offering curated multiple-choice questions to sharpen your C knowledge and support exam preparation. Choose a topic below to get started.
1. |
What will be the error in the following C code? |
A. | Negative number cannot be assigned to float data type |
B. | Long and float cannot be used together |
C. | Does not result in error |
D. | Logical errorView Answer |
Answer» C. Does not result in error | |
2. |
Which of the following header files must necessarily be included in your code, if you want to find the minimum value of unsigned short integer? |
A. | stdio.h |
B. | stdlib.h |
C. | limits.h |
D. | math.h |
Answer» D. math.h | |
3. |
Suppose we have: int a=100; (signed by default). If we want to convert this to an unsigned long integer, we can do this by making the following small change: |
A. | int a=lu100; |
B. | int a= 100ul; |
C. | int a=uu100; |
D. | int a=100uu; |
Answer» C. int a=uu100; | |
4. |
WHICH_OF_THE_FOLLOWING_HEADER_FILES_MUST_NECESSARILY_BE_INCLUDED_IN_YOUR_CODE,_IF_YOU_WANT_TO_FIND_THE_MINIMUM_VALUE_OF_UNSIGNED_SHORT_INTEGER??$ |
A. | stdio.h |
B. | stdlib.h |
C. | limits.h |
D. | math.h |
Answer» B. stdlib.h | |
5. |
What is the binary representation of the integer -14? |
A. | 11110 |
B. | 01110 |
C. | 01100 |
D. | 11100 |
Answer» C. 01100 | |
6. |
Suppose we have: int a=100; (signed by default). |
A. | |
B. | int a=lu100; |
C. | int a= 100ul; |
Answer» D. | |
7. |
What is the default state of an integer in c language? |
A. | Signed |
B. | Unsigned |
C. | System dependent |
D. | There is no default state |
Answer» B. Unsigned | |
8. |
-A |
A. | BAT |
B. | A |
C. | 65 |
Answer» C. 65 | |
9. |
-65 |
A. | 65 |
B. | -97 |
C. | 97 |
Answer» D. | |
10. |
Sign qualifiers can be applied to double. |
A. | True |
B. | False |
Answer» C. | |
11. |
In a signed integer, the sign is represented by ___________ |
A. | Least significant bit |
B. | Most significant bit |
C. | System dependent |
D. | The mean of the most significant bit and the least significant bit |
Answer» B. Most significant bit | |