Quiz on C Program Structure and Execution

Quiz on C Program Structure and Execution

University

15 Qs

quiz-placeholder

Similar activities

MSD QUIZ-06

MSD QUIZ-06

University

10 Qs

Power Point 1

Power Point 1

University

10 Qs

Microsoft Word Office

Microsoft Word Office

10th Grade - University

11 Qs

CHP_1_Language processor MCQ(SP)

CHP_1_Language processor MCQ(SP)

University

20 Qs

Python Intermediate Quiz - 1

Python Intermediate Quiz - 1

8th Grade - Professional Development

13 Qs

PBMS Kumustahan

PBMS Kumustahan

University

10 Qs

Revision module 3

Revision module 3

University

10 Qs

OPEN TEST 1

OPEN TEST 1

University

12 Qs

Quiz on C Program Structure and Execution

Quiz on C Program Structure and Execution

Assessment

Quiz

Education

University

Hard

Created by

NARENDRA BAVISETTI

Used 3+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the `#include ` directive in a C program?

To define the `main` function

To include standard input-output functions

To declare variables

To perform arithmetic operations

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Where does the execution of a C program start?

At the `#include` directives

At the `main` function

At the `return` statement

At any function defined in the program

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to define the `main` function?

`int main()`

`void main()`

`main()`

All of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the role of the `return 0;` statement in the `main` function?

To end the program immediately

To indicate successful execution

To declare the variables

To include header files

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct syntax to write comments in a C program?

`// This is a comment`

`/* This is a comment */`

`# This is a comment`

Both A and B

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What happens during the preprocessing phase of a C program?

The code is compiled into machine language

Preprocessor directives like `#include` are processed

The `main` function is executed

The program is linked with libraries

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the compilation phase in a C program?

To convert the source code into executable machine code

To link the program with libraries

To preprocess the source code

To execute the program

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?

Discover more resources for Education