Variables and Data types in C | part 1

@T-Bone

This section focuses on the "Variables And Datatypes" of the C programming. These Multiple Choice Questions (mcq) should be practiced to improve the C programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

This section focuses on the "Variables And Datatypes" of the C programming. These Multiple Choice Questions (mcq) should be practiced to improve the C programming skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

Questions

1. How many keywords are there in c ?

Mark the correct option

2. Which of the following is true for variable names in C?

Mark the correct option

3. Which of the following cannot be a variable name in C?

Mark the correct option

4. What is the output of this program? void main() { int x = 10; float x = 10; printf("%d", x) }

Mark the correct option

5. What is the output of this program? #include <stdio.h> int main() { int i; for (i = 0;i < 5; i++) int a = i; printf("%d", a); }

Mark the correct option

6. What is the output of this program? #include <stdio.h> int var = 20; int main() { int var = var; printf("%d ", var); return 0; }

Mark the correct option

7. What is the output of this program? void main() { int p, q, r, s; p = 1; q = 2; r = p, q; s = (p, q); printf("p=%d q=%d", p, q); }

Mark the correct option

8. What is the output of this program? void main() { printf("%x",-1<<4);

Mark the correct option

9. What is the output of this program? #include <stdio.h> void main() { int a=1, b=2, c=3, d; d = (a=c, b+=a, c=a+b+c); printf("%d %d %d %d", d, a, b, c); }

Mark the correct option

10. What is the output of this program? void main() { int a, b = 5, c; a = 5 * (b++); c = 5 * (++b); printf("%d %d",a,c); }

Mark the correct option

11. What is size of int in C ?

Mark the correct option

12. Range of double is -1.7e-38 to 1.7e+38 (in 16 bit platform - Turbo C under DOS)

Mark the correct option

13. Which is false?

Mark the correct option

14. Array is ______ datatype in C Programming language.

Mark the correct option

15. If you pass an array as an argument to a function, what actually gets passed?

Mark the correct option

16. When double is converted to float, the value is?

Mark the correct option

17. Which of the following is not a logical operator?

Mark the correct option

18. What is the output of this program? #include <stdio.h> int main(){ printf("%d",EOF); return 0; }

Mark the correct option

19. What is the output of this program? #include <stdio.h> int main(){ char num = '10'; printf("%d", num); return 0; }

Mark the correct option

20. What is the output of this program? #include <stdio.h> int main(){ void num=10; printf("%v", num); return 0; }

Mark the correct option

Index of Questions