C Data Types 2 Questions and Answers

Take Exam

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

Showing 10 of 159 questions

151. Find the output void main ( ) { printf ("%d", 4>>256); }

  • 0
  • 4
  • 16
  • 32
Show Answer Report

152. Find the output void main ( ) { int i=3, j=2, k=1; printf ("%d/%d"); }

  • 1
  • 0
  • 3/2
  • 1/2
Show Answer Report

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
Show Answer Report

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
Show Answer Report

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
Show Answer Report

156. Find the output void main ( ) { int a=0150, b=057, c; c=a+b; printf ("%d", c); }

  • 0257
  • 257
  • 151
  • None of these
Show Answer Report

157. Find the output void main ( ) { int i=49; printf("%d %p", i, i); }

  • 49 0049
  • 49 0001
  • 49 0031
  • 49 1
Show Answer Report

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
Show Answer Report

159. Find the output void main ( ) { int a="%d"; printf("%d',a); }

  • %d
  • Garbage
  • 37
  • %
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test