100 Multiple Choice Questions In C Programming – Part 2
This collection of 100 Multiple Choice Questions and Answers (MCQs) In C Programming : Quizzes & Practice Tests with Answer focuses on “C Programming”.
1. What is a “console mode” program?
A A program that runs only on a game console
B A program that runs in a Dos window
C A program in a graphic environment with windows
D None of the above
2. When we declare a variable, which memory is used?
A RAM
B ROM
C Hard disk
D Microprocessor
[st_adsense]
3. Which of the following is not a valid variable name statement?
A int __a7;
B int __7a;
C int __A7;
D None of the above
4. Which of the following is not a valid variable name statement?
A int _a7;
B int a_7;
C int 7_a;
D int _7a
5. Variable names beginning with underscore “_” are not encouraged. So why not?
A It is not normalized
B To avoid conflicts since assemblers and compilers can use variables containing underscore
C To avoid conflicts since library routines can use variables containing underscore
D To avoid conflicts with the operating system’s environment variables
6. All keywords in C are in ______?
A lowercase letters
B uppercase letters
C CamelCase letters
D None of the above
[st_adsense]
7. Resolution of variable names depends on _______?
A The implementation of the compiler and linker
B The implementation of the assembler and the loader
C C language
D None of the above
8. Which of the following is not a valid variable name statement?
A int nbr;
B float price;
C int variable_count;
D int $main;
9. Which of the following statements is true about variable names in C?
A They can contain alphanumeric characters as well as special characters
B It is not a problem to declare a variable as one of the keywords (like goto, static)
C Variable names cannot start with a number
D Variable can be of any length.
[st_adsense]
10. The variable X contains 9.5 , What does the following line print?
printf("X = %d ",X);
A X = %d
B X = 9.5
C X = 9
D X = d , X