C/C MCQ Quiz Hub

C programming language MCQ Questions Set 3

Choose a topic to test your knowledge and improve your C/C skills

Which of the following statements are false?





✅ Correct Answer: 2

For what values of the expression is an if-statement block not executed?





✅ Correct Answer: 3

Which of the two operators ++ and — work for the bool data type in C++?





✅ Correct Answer: 2

How many characters are specified in the ASCII scheme?





✅ Correct Answer: 2

Which of the following belongs to the set of character types?





✅ Correct Answer: 4

How do we represent a wide character of the form wchar_t?





✅ Correct Answer: 1

In C++, what is the sign of character data type by default?





✅ Correct Answer: 3

Is the size of character literals different in C and C++?





✅ Correct Answer: 3

Suppose in a hypothetical machine, the size of char is 32 bits. What would sizeof(char) return?





✅ Correct Answer: 2

What constant defined in <climits> header returns the number of bits in a char?





✅ Correct Answer: 4

The size_t integer type in C++ is?





✅ Correct Answer: 3

Which of these expressions will return true if the input integer v is a power of two?





✅ Correct Answer: 4

Which of these expressions will make the rightmost set bit zero in an input integer x?





✅ Correct Answer: 2

Which of these expressions will isolate the rightmost set bit?





✅ Correct Answer: 3

0946, 786427373824, ‘x’ and 0X2f are _____ _____ ____ and _____ literals respectively.





✅ Correct Answer: 4

Which of the following is not one of the sizes of the floating point types?





✅ Correct Answer: 1

What is the range of the floating point numbers?





✅ Correct Answer: 1

Which of three sizes of floating point types should be used when extended precision is required?





✅ Correct Answer: 3

Which is used to indicate single precision value?





✅ Correct Answer: 1

Which is correct with respect to the size of the data types?





✅ Correct Answer: 4

The size of an object or a type can be determined using which operator?





✅ Correct Answer: 2

It is guaranteed that a ____ has at least 8 bits and a ____ has at least 16 bits.





✅ Correct Answer: 4

Implementation dependent aspects about an implementation can be found in ____





✅ Correct Answer: 2

Size of C++ objects are expressed in terms of multiples of the size of a ____ and the size of a char is ______





✅ Correct Answer: 1

Identify the incorrect option.





✅ Correct Answer: 3

Which of the following will not return a value?





✅ Correct Answer: 2

__________ have the return type void.





✅ Correct Answer: 4

What does the following statement mean? void a;





✅ Correct Answer: 4

Choose the incorrect option.





✅ Correct Answer: 2

Identify the incorrect option.





✅ Correct Answer: 3

In which type do the enumerators are stored by the compiler?





✅ Correct Answer: 2

To which of these enumerators can be assigned?





✅ Correct Answer: 4

What will happen when defining the enumerated type?





✅ Correct Answer: 1

Which variable does equals in size with enum variable?





✅ Correct Answer: 1

What does the following statement mean? int (*fp)(char*)





✅ Correct Answer: 3

 Choose the right option. string* x, y;





✅ Correct Answer: 1

Which one of the following is not a possible state for a pointer.





✅ Correct Answer: 4

Which of the following is illegal?





✅ Correct Answer: 3

The correct statement for a function that takes pointer to a float, a pointer to a pointer to a char and returns a pointer to a pointer to a integer is _______





✅ Correct Answer: 3

Which of the following correctly declares an array?





✅ Correct Answer: 1

What is the index number of the last element of an array with 9 elements?





✅ Correct Answer: 2

What is the correct definition of an array?





✅ Correct Answer: 1

Which of the following accesses the seventh element stored in array?





✅ Correct Answer: 1

Which of the following gives the memory address of the first element in array?





✅ Correct Answer: 4

What is the meaning of the following declaration? int(*p[5])();





✅ Correct Answer: 2

What is size of generic pointer in C++ (in 32-bit platform)?





✅ Correct Answer: 2

The constants are also called as ________





✅ Correct Answer: 3

What are the parts of the literal constants?





✅ Correct Answer: 4

How are the constants declared?





✅ Correct Answer: 3