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
141. Find the output void main ( ) { int me=9, you=1; printf("%d', (me+you) ++); }
- 10
- 11
- Compilation error
- None of these
142. Find the output void main ( ) { char acc='8'; int 1td=8; printf("%d %d %d", 1td, 1td+=acc>='0' &&acc<='9' ,acc++); }
- 8 8 56
- 8 9 56
- 9 9 56
- Compilation error
143. Find the output unsigned bit (unsigned ha, int hi, int hu) { return (ha>>(hi+1-hu)) & ~ (~0<<hu); } void main( ) { unsigned idiot =118; printf("%d", bit (idiot, +9, 5)); }
- 3
- 4
- 5
- 6
144. If increase the float variables beyond its maximum range
- -ve value
- +ve value
- +INF
- - INF
145. Find the output if the input is ab void main ( ) { char c; while (c=getchar ( )! = '\n') printf("%d", c); }
- 65
- 66
- 6566
- 11
146. Find the output void main ( ) { float x=2.8, y=4; if (x%=y) printf("Both are equal"); else printf("Not equal"); }
- Both are equal
- Not equal
- Compilation error
- None of these
147. Find the output void main ( ) { float j; j=1000*1000; printf("%f", j); }
- 1000000
- 16960.00000
- Compilation error
- None of these
148. Find the output void main ( ) { float j; j=1000+1000; printf("%f', j); }
- 1000000
- 16960.00000
- Compilation error
- None of these
149. Find the output int i=40000; void main ( ) { printf (%1d", i); }
- 40000
- -25536
- Garbage
- None of these
150. Which of the following escape sequences output is only observed with the help of a printer ?
- \a, \t
- \b, \r
- \r, \v
- \f, \v