Top 150+ Solved Programming for Problem Solving MCQ Questions Answer
Q. which of the following is the best for getting a string with space from thestandard input
a. gets
b. getc
c. fgets
d. puts
Q. Which statement is used to compare the two strings?
a. strcmp
b. strcompare
c. stringcompare
d. str_cmp
Q. What is maximum dimension that array can have in c programming?
a. 2
b. 4
c. Theoretically No Limit but practically limit depends on memory
d. 3
Q. Array with last element 'n' will always have array size equal to _______.
a. n+1
b. n-1
c. n+n
d. n
Q. Array is an example of _______ type memory allocation.
a. Compile Time
b. Run Time
c. none
d. all
Q. Array is ______ data type in C Programming language.
a. Custom Data Type
b. Primitive Data Type
c. None of these
d. Derived Data Type
Q. What will happen if in a C program you assign a value to an array element whose subscript exceeds the size of array?
a. The element will be set to 0.
b. The compiler would report an error.
c. The array size would appropriately grow.
d. The program may crash if some important data gets overwritten.
Q. If you pass an array as an argument to a function, what actually gets passed?
a. Base address of the array
b. Value of elements in array
c. First element of the array
d. Address of the last element of array
Q. Pointer is special kind of variable which is used to store __________ of the variable.
a. Address
b. Value
c. Variable Name
d. Data Type
Q. Address stored in the pointer variable is of type __________.
a. Integer
b. Array
c. Floating
d. Character