C Programming Quiz

C Programming Quiz

University

25 Qs

quiz-placeholder

Similar activities

PSC - Quiz 2

PSC - Quiz 2

University

23 Qs

Advanced C quiz

Advanced C quiz

University

21 Qs

CODE JAM

CODE JAM

KG - University

25 Qs

Quiz Unit 2-3 before CT2

Quiz Unit 2-3 before CT2

University

21 Qs

String in C Programming

String in C Programming

University

26 Qs

Arrays and pointers quiz

Arrays and pointers quiz

University

20 Qs

C programming syntax quiz

C programming syntax quiz

University

20 Qs

CCE-III Programming in C Language

CCE-III Programming in C Language

University

20 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Computers

University

Medium

Created by

Kommu Kusumakumari

Used 3+ times

FREE Resource

25 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of the #include directive in a C program?

To include the standard input/output library

To define a constant

To declare variables

To initialize the main function

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct way to declare a variable in C?

int x;

int x = 10;

int x + 10;

declare int x = 10;

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the purpose of the break statement in a loop?

To terminate the loop immediately

To skip the current iteration

To restart the loop

To execute the next statement after the loop

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which loop construct in C is best suited for a situation where the number of iterations is known beforehand?

while loop

do-while loop

for loop

infinite loop

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a valid way to declare a 2D array in C?

int arr[3][4];

int arr[3,4];

int[3][4] arr;

int arr(3)(4);

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is NOT a logical operator in C?

AND

OR

NOT

IF

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which comparison operator can be used to check if one value is less than another?

!==

>=

==

<

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?