10 Questions
What is the purpose of a comment line in a C program?
The purpose of a comment line is to increase the readability of the program and provide explanations or documentation about the program.
What is a preprocessor directive in C?
A preprocessor directive in C is a statement that begins with a '#' symbol and tells the compiler to perform specific actions before the compilation process.
What does the '#include' preprocessor directive do?
The '#include' preprocessor directive tells the compiler to include information about the standard input/output library and allows the program to use functions like printf() and scanf().
What is the role of the stdio.h header file in C?
The stdio.h header file in C contains the definitions and declarations of system-defined functions, such as printf(), scanf(), and pow().
Where can a comment line be placed in a C program?
A comment line can be placed anywhere in the program except inside string constants and character constants.
Which of the following is NOT a part of the basic structure of a C program?
User defined function
What is the purpose of a comment line in a C program?
To provide documentation
What does the '#include' preprocessor directive do?
Includes information about the standard input/output library
Where can a comment line be placed in a C program?
Anywhere in the program except inside string constant & character constant
What does the stdio.h header file contain in C?
Definition & declaration of system defined functions
Test your knowledge on the basic structure of C programs with this quiz. From comment lines to preprocessor directives, global variable declarations to user-defined functions, this quiz covers it all. See how well you understand the fundamental components of a C program.
Make Your Own Quizzes and Flashcards
Convert your notes into interactive study material.
Get started for free