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

71. Find the output. void main ( ) { int x=12; int y=16; printf ("%hx %dx", x,y); }

  • c 16x
  • c 10
  • c 16
  • None of these
Show Answer Report

72. Find the output vid main ( ) { double d=2 . 4; printf ("%g", d); }

  • 2.4
  • Garbage
  • 2.400000
  • %g
Show Answer Report

73. Find the output void main ( ) { typedef int float; float x=4.7; printf ("%d", sizeof (x)); }

  • 4
  • 2
  • Compilation errr
  • None of these
Show Answer Report

74. The synonym for an existing data type created by typedef reserves memory of

  • One byte
  • Two bytes.
  • Depends upon the data type
  • None of these
Show Answer Report

75. Find the output extern int x; void main ( ) { typedef int myint; myint x; printf ("%d", x); }

  • 0
  • Garbage
  • Error, multiple declaration for x
  • None of these
Show Answer Report

76. Find the output void main ( ) { unsigned enum color { red='0', green=0, blue}' printf (%d %d %d", red, green, blue); }

  • 48 49 50
  • 48 0 1
  • 0 0 1
  • Compilation error
Show Answer Report

77. Find the output void main ( ) { char c='\ci'; printf ("%c", c); }

  • \
  • \c
  • c
  • \ci
Show Answer Report

78. Find the output void main ( ) { int a=b=c=10; printf("%d %d %d", a, b, c); }

  • 10 10 10
  • 0 0 10
  • Garbage Garbage 10
  • Compilation error
Show Answer Report

79. Real constant in C can be expressed in which off the following forms

  • Fractional form only
  • Exponential form only
  • ASCII form only
  • Both Fractional & Exponential forms
Show Answer Report

80. the maximum index in an int array in Turbo c 3.0 is

  • 16383
  • 32767
  • Does not have any upper limit
  • None of these
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test