The ones who are crazy enough to think they can change the world are the ones who do.- Steve Jobs
In most of the MNC interview questions such as in ZOHO interview question, IVTL Infoview interview questions, Amazon interview questions, GOOGLE interview questions, Infosys interview questions and even in Voonik interview questions, We come across several Tricky C Questions about which 2:5 of the questions are from data types in c. Solving that kind of tricky C questions is not an easy task for all C programmers. We need more practices to solve it with ease. So we provide 25+ interesting C questions in data types to make your MNC interview very easy.
11. Which of the following data type is right C programming?
#include<stdio.h> int main(){ int num = - -2; printf("num = %d", num); return 0; }
Option: D
minus and minus are get multiplied, thus the result is 2.
12. Find the odd one out?
Option: A
Extern, huge, registers are all the modifiers of data types in C. Interrupt is also a modifier data type, but we misspelled the word as interupt
13. What will be the output of the C program?
#include<stdio.h> int main() { float a = 5.0; printf ("Result is = %d ", (24 / 5) * a); return 0; }
Option: D
Output must be 20.000000. As we use %d as a format specifier, it displays 0
14. What will be the output of the C program?
#include<stdio.h> int main() { 10; printf("%d", 10); }
Option: B
10; is an executable statement. So it doesn't end up with compilation error.
15. What will be the output of the C program neglecting user input?
#include<stdio.h> int main() { enum fruits{ apple, mango } ; printf("%d %d", apple, mango); return 0; }
Option: C
The values of apple, mango are available in fruits by default enum keyword initialize its value from 0 to n
We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.
© Copyright 2019