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

101. Find the output void main ( ) { enum values (x, y, z); printf (%d %d %d", x++, y++, ++z); }

  • 0 1 2
  • 0 1 3
  • 1 2 3
  • Compilation error
Show Answer Report

102. The synonym for an existing data type can be created using

  • typedef
  • structure
  • enum
  • All of the above
Show Answer Report

103. Find the output void main ( ) { int x=345, r, sum=0, i; if x!=0) { r=x%10; sum+=r; i=i/10; } printf ("%d", sum); }

  • 5
  • 12
  • Compilation error
  • None of these
Show Answer Report

104. Find the output void main ( ) { int x=-300; unsigned char *p; p=&x; printf ("%d", *p++); printf("%d", *p); }

  • 212 88
  • 212 254
  • 128 172
  • None of these
Show Answer Report

105. Find the output void main ( ) { float f; f=5/2; printf("%F %f", f, 5/2); }

  • 2.5000 2.5000
  • 2.0000 2.0000
  • 2.0000 Garbage value
  • Both outputs have garbage values
Show Answer Report

106. Find the output void main ( ) { int p=7, q=9; p=p^q; q=q^p; printf("%d %d", p,q); }

  • 7 9
  • 9 7
  • 18 9
  • 14 7
Show Answer Report

107. Find the output void main ( ) { int x=65536, y; y=sizeof (++x); printf("%d %d', x,y); }

  • 0 2
  • 1 2
  • 65536 2
  • None of these
Show Answer Report

108. Find the output void main ( ) { long i=60000+5536; printf("%d->%d", i) }

  • 65536->0
  • 65536-1
  • 0->1
  • 1->0
Show Answer Report

109. Find the output void main ( ) { printf("%d', sizeof (!5.0)); }

  • 5
  • 2
  • 8
  • 4
Show Answer Report

110. Find the output. void main ( ) char i=1; for (i;i<127;i++) printf("Fll1"); }

  • Prints Fool 127 times
  • Prints Fool 126 times
  • Prints Fool infinite times
  • None of these
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test