C Programming Quiz

C Programming Quiz

Professional Development

20 Qs

quiz-placeholder

Similar activities

Know your basics in C?

Know your basics in C?

Professional Development

20 Qs

PSC Quiz1

PSC Quiz1

University - Professional Development

20 Qs

C programming_Shivank

C programming_Shivank

Professional Development

20 Qs

increment and decrement

increment and decrement

Professional Development

20 Qs

C Code Master

C Code Master

Professional Development

20 Qs

Quiz on switch_for_while_dowhile

Quiz on switch_for_while_dowhile

Professional Development

20 Qs

PSPC1

PSPC1

Professional Development

20 Qs

Preprocessor Directives

Preprocessor Directives

Professional Development

25 Qs

C Programming Quiz

C Programming Quiz

Assessment

Quiz

Computers

Professional Development

Medium

Created by

AKHILA P

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the correct way to declare an integer variable in C?

int 1number;

int number1;

number int;

int ; number1

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct syntax for a for loop in C?

for (i = 0; i < 10; i++)

for (i < 10; i++)

for i = 0; i < 10; i++

for (i = 0; i < 10)

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

How do you access the third element of an array named arr in C?

arr[2]

arr[3]

arr(3)

arr{3}

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is a valid if statement in C?

if x > 10

st1;

if (x > 10)

{

st1;

}

if (x > 10);

st1;

if x > 10

{

st1;

}

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which library is required to use the strlen function?

stdlib

stdio

string

ctype

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following code? for (int i = 0; i < 5; i++) { printf("%d ", i); }

0 1 2 3 4

1 2 3 4 5

0 1 2 3 4 5

error

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which of the following is the correct syntax for a while loop in C?

while (condition) { statement; }

while condition { statement; }

while (condition) statement;

while { condition; }

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?