Introduction to Programming MCQs with Answers
Practice important Introduction to Programming MCQs with answers and explanations.
Multiple Choice Questions
Q31: What is the difference between an interpreter and a compiler?
- A: An interpreter translates line by line
- B: A compiler translates line by line
- C: An interpreter translates the whole program at once
- D: A compiler translates the whole program at once
View Answer
A
Q32: Which organization standardized the C language?
- A: ISO
- B: ANSI
- C: NIST
- D: IEEE
View Answer
B
Q33: What is the purpose of a text editor in programming?
- A: Writing code
- B: Translating code
- C: Formatting code
- D: Saving code
View Answer
A
Q34: Which tool is used to check and correct logical errors in a program?
- A: Compiling code
- B: Debugging code
- C: Linking code
- D: Executing code
View Answer
B
Q35: Which tool is used to load a program into memory for execution?
- A: Compiling code
- B: Storing code
- C: Executing code
- D: Linking code
View Answer
D
Q36: #include is a ___________ in C programming.
- A: function
- B: variable
- C: pre-processor directive
- D: loop
View Answer
C
Q37: The main function in C is executed ________.
- A: first
- B: after all other functions
- C: only if called
- D: none of the above
View Answer
A
Q38: What is the output of the following code: cout << 'Welcome to Virtual University of Pakistan';?
- A: Displays Welcome to Virtual University of Pakistan on the screen
- B: Displays Welcome to the screen
- C: Displays Virtual University of Pakistan on the screen
- D: Displays nothing
View Answer
A
Q39: Which of the following is used to store whole numbers in C?
- A: int
- B: char
- C: float
- D: double
View Answer
A
Q40: What is the size of int data type in C?
- A: 2 bytes
- B: 4 bytes
- C: 1 byte
- D: 8 bytes
View Answer
B