The ones who are crazy enough to think they can change the world are the ones who do.
- Steve Jobs

C Data Types Interview Questions

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.

Data Types Interview Questions

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;
}

A. Runtime error

B. Compilation error

C. -2

D. 2

x

 

Option: D

Explanation

minus and minus are get multiplied, thus the result is 2.

Answer


12. Find the odd one out?

A. interupt

B. register

C. extern

D. huge

x

 

Option: A

Explanation

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

Answer


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;
}

A. 20.000000

B. 20

C. Runtime error

D. 0

x

 

Option: D

Explanation

Output must be 20.000000. As we use %d as a format specifier, it displays 0

Answer


14. What will be the output of the C program?

#include<stdio.h>
int main()
{
	10;
	printf("%d", 10);
}

A. Compilation Error

B. 10

C. Runtime error

D. No output

x

 

Option: B

Explanation

10; is an executable statement. So it doesn't end up with compilation error.

Answer


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;
}

A. Compilation error

B. 1 2

C. 0 1

D. Runtime error

x

 

Option: C

Explanation

The values of apple, mango are available in fruits by default enum keyword initialize its value from 0 to n

Answer


Report Us

We may make mistakes(spelling, program bug, typing mistake and etc.), So we have this container to collect mistakes. We highly respect your findings.

Report