C Intro..

C Intro..

Assessment

Flashcard

Others

University

Practice Problem

Hard

Created by

Wayground Content

FREE Resource

Student preview

quiz-placeholder

5 questions

Show all answers

1.

FLASHCARD QUESTION

Front

What will be the output of the following code? int x = 10; if (x > 5) printf("High"); else printf("Low");

Back

High

2.

FLASHCARD QUESTION

Front

Which of the following is a correct use of the switch statement? Options: switch(x) { case 1: ... }, switch(x > 10) { case true: ... }, switch(x = 5) { case x: ... }, switch { case 1: ... }

Back

switch(x) { case 1: ... }

3.

FLASHCARD QUESTION

Front

What does the continue statement do in a loop?

Back

Skips the current iteration and moves to the next one

4.

FLASHCARD QUESTION

Front

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

Back

012

5.

FLASHCARD QUESTION

Front

You need to build a billing system that calculates total with tax. Which control structure is most suitable?

Back

if-else

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?