Top 150+ Solved Programming for Problem Solving MCQ Questions Answer
Q. #include "stdio.h"int main(){ int a = 10, b = 20; if(a=b) { printf("Easy"); } else { printf("Hard"); } return 0;}
a. Easy
b. Hard
c. EasyHard
d. Error in program
Q. Which gcc flag is used to enable all Compiler warnings?
a. gcc -W
b. gcc -w
c. gcc -Wall
d. gcc -wall
Q. Which gcc flag is used to generate maximum debug information?
a. gcc -g0
b. gcc –g1
c. gcc -g
d. gcc –g3
Q. Which macro is used to insert assembly code in C program (VC++compiler)?
a. __asm__
b. _asm_
c. __asm
d. asm
Q. Which macro is used to insert assembly code in C program (GCCcompiler)?
a. __asm__
b. _asm_
c. __asm
d. asm
Q. Will compiler produce any compilation error if same header file isincluded two times?
a. YES
b. NO
c. Option.
d. Option.
Q. What should be the output of below program?#define # @@include "stdio.h"int main(){printf("C.com");return 0;}
a. C.com
b. Nothing
c. Compilation Error
d. Depends on Complier
Q. Which one of the following is invalid macro in C programming?
a. #pragma
b. #error
c. #ifndef
d. #elseif
Q. Set of consecutive memory locations is called as ________.
a. Function
b. Array
c. Loop
d. Pointer
Q. Array can be considered as set of elements stored in consecutive memorylocations but having __________.
a. Same Data Type
b. Same Scope
c. None of these
d. Different Data Type
Q. In Array, There is one to one correspondence between set of ________and set of values.
a. Indices
b. Variables
c. Constants
d. Memory Locations
Q. Smallest element of an array is called as _______.
a. Middle Bound
b. Range
c. Upper Bound
d. Lower Bound
Q. If we have declared an array described below –int arr[6];then which of the following array element is considered as last array element ?
a. arr[6]
b. arr[4]
c. arr[0]
d. arr[5]