C Programming Quiz(session2)

C Programming Quiz(session2)

10th Grade

21 Qs

quiz-placeholder

Similar activities

OCR J275 Hardware Part B

OCR J275 Hardware Part B

10th Grade

20 Qs

School Mangement System ICT 0417 IGCSE

School Mangement System ICT 0417 IGCSE

10th - 12th Grade

18 Qs

X.K Bab 5 Jaringan Komputer dan Internet

X.K Bab 5 Jaringan Komputer dan Internet

10th Grade

20 Qs

Pemrograman Dasar 3

Pemrograman Dasar 3

9th - 12th Grade

20 Qs

Ulangan Harian - Jaringan Komputer & Analisis Data

Ulangan Harian - Jaringan Komputer & Analisis Data

10th Grade

20 Qs

Conditions

Conditions

8th - 10th Grade

16 Qs

C Programming Quiz(session2)

C Programming Quiz(session2)

Assessment

Quiz

Computers

10th Grade

Practice Problem

Medium

Created by

Sumithra pm

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

21 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct syntax for the ternary operator in C?

if ? else :

condition ? true_value : false_value;

? condition : true_value;

if (condition) ? true : false;

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the output of the following code? int a = 10; if (a > 5) printf("A"); else printf("B");

A

B

Nothing

Error

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which loop guarantees at least one execution of the loop body?

for

while

do...while

if

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which control statement is best suited for multiple constant-value selections?

if

else if

switch

while

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will the following code print? int i; for (i = 1; i 0) ? printf("Positive") : printf("Negative");

Positive

Negative

Error

Nothing

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is not a valid keyword in C for control statements?

if

switch

select

else

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

The default keyword is used in which control structure?

if

else if

switch

while

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?