Search Header Logo

Exam

Authored by Gracjan Kątek

Education

University

Exam
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

12 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the syntax for declaring a function in C?

funcName();

void funcName();

functionName;

funcName(void);

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to initialize an integer variable in C?

int x = 10;

integer x = 10;

x = 10;

int x;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to access the value at a given memory address in C?

*

&

#

$

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the break statement in a switch statement in C?

To exit the loop.

To skip the current iteration.

To terminate the program.

To exit the switch statement.

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet in C?

printf("%d", sizeof("Hello"));

5

6

10

Compiler error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the purpose of the continue statement in a loop in C?

To exit the loop.

To skip the current iteration.

To terminate the program.

To restart the loop.

7.

FILL IN THE BLANK QUESTION

1 min • 1 pt

What is the correct format specifier to print a single character in C?

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?