Search Header Logo

C Programming Quiz

Authored by InfiTechLearn Team

Other

University

30 Questions

C Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid declaration in C?

int 2num;

float rate = 5.5.5;

char letter = 'A';

int long = 10;

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which format specifier is used for printing unsigned int in C?

%d

%c

%f

%u

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will sizeof('A') return in C?

2

1

4

8

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which loop is guaranteed to execute at least once?

for loop

do-while loop

while loop

goto

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of printf("%d", 5 + 'A');?

5

ASCII of 'A'

ASCII of 'A' + 5

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct way to declare a pointer to an integer?

int ptr;

int *ptr;

ptr int;

int &ptr;

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which operator is used to access the value at the address pointed by a pointer?

&

->

*

@

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?