InterviewSolution
Saved Bookmarks
This section includes InterviewSolutions, each offering curated multiple-choice questions to sharpen your knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
What is the sizeof(void) in a 32-bit C?(a) 0(b) 1(c) 2(d) 4I have been asked this question in an online interview.I need to ask this question from Sizeof Keyword topic in portion Floating Point & Sizeof Operator in C of C |
|
Answer» CORRECT ANSWER is (B) 1 The EXPLANATION: NONE. |
|
| 2. |
Modulus for float could be achieved by?(a) a % b(b) modulus(a, b);(c) fmod(a, b);(d) mod(a, b);This question was addressed to me during an online interview.I'd like to ask this question from Float Datatype topic in section Floating Point & Sizeof Operator in C of C |
|
Answer» The CORRECT CHOICE is (c) fmod(a, B); |
|
| 3. |
In a 32-bit compiler, which 2 types have the same size?(a) char and short(b) short and int(c) int and float(d) float and doubleThis question was addressed to me during an internship interview.Question is taken from Float Datatype topic in section Floating Point & Sizeof Operator in C of C |
|
Answer» CORRECT OPTION is (C) INT and float Explanation: NONE. |
|
| 4. |
%f access specifier is used for ________(a) Strings(b) Integral types(c) Floating type(d) All of the mentionedThis question was addressed to me in class test.Query is from Float Datatype topic in section Floating Point & Sizeof Operator in C of C |
|
Answer» RIGHT CHOICE is (C) FLOATING type Explanation: NONE. |
|
| 5. |
What is the size of float in a 32-bit compiler?(a) 1(b) 2(c) 4(d) 8This question was addressed to me during an interview.This interesting question is from Float Datatype in portion Floating Point & Sizeof Operator in C of C |
|
Answer» RIGHT ANSWER is (C) 4 Easy EXPLANATION - NONE. |
|
| 6. |
What is the sizeof(char) in a 32-bit C compiler?(a) 1 bit(b) 2 bits(c) 1 Byte(d) 2 BytesI got this question during an internship interview.I'm obligated to ask this question of Sizeof Keyword topic in section Floating Point & Sizeof Operator in C of C |
|
Answer» CORRECT choice is (C) 1 Byte The best explanation: NONE. |
|
| 7. |
Which among the following statement is right?(a) sizeof(struct stemp*) > sizeof(union utemp*) > sizeof(char *)(b) sizeof(struct stemp*) < sizeof(union utemp*) < sizeof(char *)(c) sizeof(struct stemp*) = sizeof(union utemp*) = sizeof(char *)(d) the order Depends on the compilerThe question was posed to me in final exam.I'd like to ask this question from SizeofKeyword topic in division Floating Point & Sizeof Operator in C of C |
|
Answer» Correct option is (c) SIZEOF(STRUCT stemp*) = sizeof(union utemp*) = sizeof(char *) |
|
| 8. |
Which of the following is not an operator in C?(a) ,(b) sizeof()(c) ~(d) None of the mentionedThis question was addressed to me during an online exam.My question comes from Sizeof Keyword topic in chapter Floating Point & Sizeof Operator in C of C |
|
Answer» The CORRECT OPTION is (d) NONE of the mentioned |
|
| 9. |
Which among the following is never possible as an output for a float?(a) 3.666666(b) 3.666(c) 3(d) None of the mentionedThis question was posed to me by my college director while I was bunking the class.The doubt is from Float Datatype topic in chapter Floating Point & Sizeof Operator in C of C |
|
Answer» RIGHT ANSWER is (d) NONE of the mentioned Explanation: None. |
|
| 10. |
Loss in precision occurs for typecasting from____________(a) char to short(b) float to double(c) long to float(d) float to intThis question was posed to me in final exam.I'm obligated to ask this question of Float Datatype in division Floating Point & Sizeof Operator in C of C |
| Answer» | |
| 11. |
Which among the following has the highest precedence?(a) &(b) |
|
Answer» The CORRECT OPTION is (c) SIZEOF() |
|
| 12. |
How many digits are present after the decimal in float value?(a) 1(b) 3(c) 6(d) 16The question was asked in a job interview.The query is from Float Datatype in chapter Floating Point & Sizeof Operator in C of C |
|
Answer» RIGHT CHOICE is (C) 6 The EXPLANATION: NONE. |
|