C Data Types 2 Questions and Answers
C Data Types questions with answers help learners understand how data is stored, manipulated, and used in C programming. Data types form the foundation of C as they define the type of data a variable can hold, such as int, float, char, or double. Mastering C data types is essential for students preparing for placement exams or programming interviews at companies like TCS, Infosys, and Wipro. This topic often features in C programming MCQs and technical test questions that evaluate understanding of memory allocation, data precision, and type conversions. Practice these programming questions and answers to strengthen your core knowledge and prepare for real-world coding challenges.
Understand various data types in C. Study C structures and dynamic memory allocation
C Data Types 2
151. Find the output void main ( ) { printf ("%d", 4>>256); }
- 0
- 4
- 16
- 32
152. Find the output void main ( ) { int i=3, j=2, k=1; printf ("%d/%d"); }
- 1
- 0
- 3/2
- 1/2
153. Find the output if the input is 5 5.75 void main ( ) { int i=1; float f=2.25; scanf("%d a %f', &i, &f); printf("%d %.2f", 1, f); }
- 1 2.25
- 5 5.75
- 5 2.25
- None of these
154. Find the output. void main ( ) float x=3.2; float y=2.2; printf("%.2f", x/y); }
- 1.45
- 1.45 45 45
- 1.50
- Compilation error
155. Find the output void main ( ) { float x,y; x=4.231; y=(int) x/2.0; printf("%f", y); }
- 2
- 0
- 2.00000
- 0.00000
156. Find the output void main ( ) { int a=0150, b=057, c; c=a+b; printf ("%d", c); }
- 0257
- 257
- 151
- None of these
157. Find the output void main ( ) { int i=49; printf("%d %p", i, i); }
- 49 0049
- 49 0001
- 49 0031
- 49 1
158. Find the output void main ( ) { int a=0x100; int b=0x100; int c=a*b; printf("%x", c); }
- 10000
- fffff
- 0
- None of these
159. Find the output void main ( ) { int a="%d"; printf("%d',a); }
- %d
- Garbage
- 37
- %