Variable and Comment in C MCQs Exercise II

Ques 1 Variable and Comment


Which of the following is not a technique of dynamic memory allocations in C Programming?

A dmalloc()
B realloc()
C calloc()
D malloc()

Ques 2 Variable and Comment


What is the purpose of comments in C programming?

A To execute specific code blocks
B To provide documentation and explanations
C To declare variables
D To print output

Ques 3 Variable and Comment


What happens if you declare a variable but do not initialize it in C?

A The program crashes
B The variable automatically gets a default value
C The variable remains uninitialized
D The compiler gives an error

Ques 4 Variable and Comment


What is the purpose of comments in C programming?

A To execute specific code blocks
B To provide documentation and explanations
C To declare variables
D To print output

Ques 5 Variable and Comment


Which of the following statements about comments in C is true?

A Comments are executed by the compiler.
B Comments are ignored by the compiler.
C Comments are necessary for the program to compile.
D Comments can only be used at the beginning of a program.