NM with C

NM with C

University

10 Qs

quiz-placeholder

Similar activities

Facts About Clarence

Facts About Clarence

KG - University

10 Qs

Formative Assessment : Topic 5

Formative Assessment : Topic 5

University

10 Qs

Quiz 1

Quiz 1

University

10 Qs

PTT361 Quiz 2: Lecture 3.1

PTT361 Quiz 2: Lecture 3.1

University

10 Qs

Propiedades mecánicas

Propiedades mecánicas

University

10 Qs

Heat Exchanger Quiz for Process Heat Transfer

Heat Exchanger Quiz for Process Heat Transfer

University

10 Qs

Fizyka Atomowa

Fizyka Atomowa

1st Grade - Professional Development

8 Qs

Propagação do calor

Propagação do calor

University

10 Qs

NM with C

NM with C

Assessment

Quiz

Physics

University

Hard

Created by

Yamini Dhanabalan

Used 2+ times

FREE Resource

AI

Enhance your content

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

In C, how many times will the following code block execute? int i = 0; do { i++; } while(i < 3);
3
2
0
1

2.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the output of the following code? int i; for(i=0; i<3; i++) { printf("%d ", i); }
0 1 2
0 1
1 2
1 2 3

3.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which statement is used to terminate a loop in C before its normal completion?
break
exit
return
continue

4.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

In C, what is the initial value of the loop control variable 'i' in the following loop? for(int i = 10; i < 15; i++) { ... }
10
15
0
1

5.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What will be the output of the following code snippet? int i; for(i = 0; i < 3; i++) { if(i == 1) continue; printf("%d ", i); }
0 2
1 2
0 1
0 1 2

6.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

What is the output of the following code snippet if x is set to 10? `if (x < 5) { printf("Low"); } else if (x < 15) { printf("Medium"); } else { printf("High"); }`
Medium
High
Error
Low

7.

MULTIPLE CHOICE QUESTION

30 sec • 2 pts

Which of the following is a valid syntax for a switch statement in C?
switch(expression) { case value: // code }
switch [expression] { case value: // code }
if (expression) { code }
foreach(expression) { // code }

Create a free account and access millions of resources

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

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?