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

1. Find the output void main ( ) { int x=256; char ch=x; printf {%d", ch}; }

  • -128
  • 256
  • 255
  • 0
Show Answer Report

2. The size of an integer variable depends upon

  • width of address bus
  • width of data bus
  • width of control bus
  • width of system bus
Show Answer Report

3. Integers are stored internally in

  • Decimal
  • Hexadecimal
  • Octal
  • Fixed no. of binary digits
Show Answer Report

4. Which of the following is a correct declaration?

  • int age
  • short age;
  • long age;
  • All the above
Show Answer Report

5. Find the output void main ( ) [ printf (%d%d", 4.5, 5}; }

  • 4 5
  • 0 0
  • 0 5
  • None of these
Show Answer Report

6. Which modifier almost doubles the largest value of an integer ?

  • signed
  • unsigned
  • short
  • long
Show Answer Report

7. Find the output void main ( ) enum {x=32767,y}; printf (% %d", x, y); }

  • 32767 32768
  • 32767 -32767
  • 32767 0
  • Compilation error
Show Answer Report

8. In 'C', types are partitioned in to

  • Data types
  • Data types, function types, incomplete types
  • Data types, function types, incomplete types
  • None of the above.
Show Answer Report

9. Macros like INT_MIN, INT_MAX are defined in which header file.

  • stdio.h
  • limits.h
  • dos.h
  • None of these
Show Answer Report

10. Which data type behaves like both integer type and character type ?

  • short int
  • signed int
  • char
  • enum
Show Answer Report
Questions and Answers for Competitive Exams Various Entrance Test