C Programming Quiz

C Programming Quiz

University

25 Qs

quiz-placeholder

Similar activities

C Language Basics

C Language Basics

University

26 Qs

Playing with C

Playing with C

University

20 Qs

C - Flow Control

C - Flow Control

University

20 Qs

Programming Round 1

Programming Round 1

12th Grade - University

21 Qs

DSA quiz

DSA quiz

University

20 Qs

XTK022 C Programming Test 1

XTK022 C Programming Test 1

University

20 Qs

ITSA Selection Round 1

ITSA Selection Round 1

University

27 Qs

C - Structures

C - Structures

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?