Search Header Logo

C Programming Quiz

Authored by Lavanya J

Computers

Professional Development

Used 1+ times

C Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output of the following program? #include int main(){ int x; x=10,20,30; printf("%d",x); return 0; }

10

20

30

0

Compilation error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output of following program? #include int main(){ int a = 320; char *ptr; ptr =( char *)&a; printf("%d ",*ptr); return 0; }

2

320

64

Compilation error

None of above

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output when you will execute following c code? #include int main(){ char arr[11]="The African Queen"; printf("%s",arr); return 0; }

The African Queen

The

The African

Compilation error

None of the above

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output of the following c program? #include int main(){ int _=5; int __=10; int ___; ___=_+__; printf("%i",___); return 0; }

5

10

15

Compilation error

None of these

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output of the following program? #include int main(){ float a=0.7; if(a<0.7){ printf("C"); } else{ printf("C++"); } return 0; }

C

C++

NULL

Compilation error

None of these

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output of the following program? #include int main(){ int a=2,b=7,c=10; c=a==b; printf("%d",c); return 0; }

0

1

7

2

Compilation error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be output of the following c program? #include int main(){ int max-val=100; int min-val=10; int avg-val; avg-val = max-val + min-val / 2; printf("%d",avg-val); return 0; }

55

105

60

Compilation error

None of these

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?