Explore topic-wise MCQs in C.

This section includes 5 Mcqs, each offering curated multiple-choice questions to sharpen your C knowledge and support exam preparation. Choose a topic below to get started.

1.

ERROR_IN_THE_STATEMENT:_VOID(*F)(INT,_DOUBLE)_=_NULL;?$

A. Error in the statement: char *ptr = malloc(15);
B. Error in the statement: struct S*s = NULL;
C. No error
Answer» C. No error
2.

Which of the following is not defined under the header file stddef.h?

A. size_t
B. ptrdiff_t
C. exp_t
D. nULL
Answer» E.
3.

Which of the following returns a signed integer type on finding the difference between two pointers to elements in the same array?

A. __cptrdiff__
B. cptrdiff_t
C. __ptrdiff__
D. ptrdiff_t
Answer» E.
4.

size_t is of ______________ type.

A. signed integer
B. signed character
C. unsigned integer
D. unsigned character
Answer» D. unsigned character
5.

Some types and macros defined under the header file stddef.h may be defined under other header files too.

A. True
B. False
Answer» B. False