Search Header Logo

Demo C programming

Authored by Hemant Kumar

Computers

Professional Development

Used 8+ times

Demo C programming
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

What will the following code snippet display?

int x = 10;

printf("%d", x);

10.0

"10"

10

Error

2.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Which data type is used to store whole numbers in C?

char

double

int

float

3.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

What is the purpose of the printf function in C?

To read user input

To print text on the screen

To declare variables

To create loops

4.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

What is the main advantage of using functions in C?

Increased code readability
Simpler syntax
Code reusability and modularity
Improved performance

5.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

What is the purpose of the return statement in a function in C?

To pause the execution of the function and resume it later.
To skip the execution of the function and move to the next line of code.
To print a message to the console and continue executing the function.
To terminate the execution of the function and return a value to the calling function.

6.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Which of the following is not a valid C keyword?

print
for
output
int

7.

MULTIPLE CHOICE QUESTION

20 sec • 2 pts

Which header file should you include in a C program to use the printf and scanf functions?

string.h

conio.h

math.h

stdio.h

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?