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
31. Typedef is used to
- Create a newe type
- Create a new name
- Gives power to datatype
- None of these
32. Find the output void main ( ) { printf ("%d", sizeof (5, 3)); }
- 2
- 4
- 8
- Suffering
33. Which is most appropriate declaration of a floating point number ?
- float x=1.5
- float y=1.5f
- double z=1.5
- Both b and c
34. Which of the following creates a sequence set of integral constants ?
- integer array
- enum
- structure
- None of these
36. Choose the correct statement for unsigned char
- The sign bit acts as a data bit.
- the sign bit not acts as a data bit.
- The sign bit is always 0
- The sign bit is always 1
37. 'void' is an empty data type associated with
- All aggregate types
- All data types
- All functions and pointers
- All the above
38. Which of the following is a valid hexadecimal integer constant ?
- -0xa
- 0x5.2
- 0x1F
- All the above
39. The rang eof enum data type
- 0 to (INT_MAX) -1
- 0 TO (INT_MAX) +1
- 0 TO UNIT-MAX
- INT_MIN-INT_MAX
40. A character constant is
- 1 byte long
- 2 bytes long
- System dependent
- None of these