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
51. Find the output #include"limits.h" void main ( ) { signed short int x=9; if (x & INT_MIN) = = INT_MIN printf("neglative"); else printf ("positive"); }
- Positive
- Negative
- Compilation error
- None of these
52. L-value is not applicable to
- Scalar data types
- Derived data types
- Pointer
- Function name
53. Find the output void main ( ) { int x =9; float f=(float)x/2; printf ("%d", f); }
- 4.50000
- 4
- 0
- Garbage value
54. Find the output void main ( ) { int x=266; printf ("%0x", x); }
- No output
- 266
- 10A
- 10a
55. Find the output void main ( ) { int x=078; printf ("%d", x); }
- 0378
- 378
- Compilation error
- None of these
56. Find the output void main ( ) { printf ("/*cd*/ef"); }
- abef
- ab
- ab/8cd*/ef
- Error: comments are not allowed within the sentence
57. Find the output. void main ( ) { int a=1,b ; b=+-+a+-a; printf (%d", b); }
- 0
- 2
- -2
- None of these
58. Find the output void main ( ) { int x=2; printf ("%d", x*=3/2); }
- 2
- 0
- 3
- None of the these
59. Find the output extern int i; void main ( ) { printf ("%d", i); }
- 0
- Garbage
- Compilation error
- None of these
60. Find the output. void main ( ) { unsigned 10ng i=40000; printf (%d", i); }
- % 1
- 40000
- Garbage value
- No output.