MCQOPTIONS
Saved Bookmarks
This section includes 10 Mcqs, each offering curated multiple-choice questions to sharpen your Company QA knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What will be the output of the following C++ function? |
| A. | 0 |
| B. | 1 |
| C. | Compiler error may be possible |
| D. | Runtime error may be possibleView Answer |
| Answer» D. Runtime error may be possibleView Answer | |
| 2. |
0946, 786427373824, ‘x’ and 0X2f are _____ _____ ____ and _____ literals respectively. |
| A. | decimal, character, octal, hexadecimal |
| B. | octal, hexadecimal, character, decimal |
| C. | hexadecimal, octal, decimal, character |
| D. | octal, decimal, character, hexadecimal |
| Answer» E. | |
| 3. |
What is the value of the following 8-bit integer after all statements are executed? |
| A. | 1 |
| B. | -1 |
| C. | 127 |
| D. | Implementation definedView Answer |
| Answer» E. | |
| 4. |
The size_t integer type in C++ is? |
| A. | Unsigned integer of at least 64 bits |
| B. | Signed integer of at least 16 bits |
| C. | Unsigned integer of at least 16 bits |
| D. | Signed integer of at least 64 bits |
| Answer» D. Signed integer of at least 64 bits | |
| 5. |
ANDING_INTEGER_‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚Àւ§A‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬•_WITH_‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚Àւ§TRUE‚ÄÖ√Ñ√∂‚ÀÖ√Ë‚ÀÖ¬•_:8?$# |
| A. | ANDing integer ‘a’ with ‘true’ :0 |
| B. | ANDing integer ‘a’ with ‘true’ :1 |
| C. | None of the mentioned |
| Answer» D. | |
| 6. |
0946, 786427373824, ‘x’ and 0X2f are _____ _____ ____ and _____ literals respectively.$ |
| A. | decimal, character,octal, hexadecimal |
| B. | octal, hexadecimal, character, decimal |
| C. | hexadecimal, octal, decimal, character |
| D. | octal, decimal, character, hexadecimal |
| Answer» B. octal, hexadecimal, character, decimal | |
| 7. |
Which of these expressions will isolate the rightmost set bit? |
| A. | x = x & (~x) |
| B. | x = x ^ (~x) |
| C. | x = x & (-x) |
| D. | x = x ^ (-x) |
| Answer» E. | |
| 8. |
Which of these expressions will make the rightmost set bit zero in an input integer x? |
| A. | x = x | (x-1) |
| B. | x = x & (x-1) |
| C. | x = x | (x+1) |
| D. | x = x & (x+2) |
| Answer» D. x = x & (x+2) | |
| 9. |
Which of these expressions will return true if the input integer v is a power of two? |
| A. | (v | (v + 1)) == 0; |
| B. | (~v & (v – 1)) == 0; |
| C. | (v | (v – 1)) == 0; |
| D. | (v & (v – 1)) == 0; |
| Answer» E. | |
| 10. |
x is greater |
| A. | y is greater |
| B. | implementation defined |
| C. | arbitrary |
| Answer» B. implementation defined | |