Search Header Logo

Ouput prediction in C

Authored by Pradeepkanna D

Information Technology (IT)

University

Used 1+ times

Ouput prediction in C
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following code? int a=5; printf("%d", a++);

4

5

6

Compilation Error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Predict the output: int x=10; printf("%d", x+=5);

10

15

5

Error

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Output of code: printf("%d", 10/3);

3.33

3

0

Error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the error: int a[5]={1,2,3,4,5,6};

Logical error

Runtime error

Compile time error

No error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Predict the output: int i=1; while(i<=3){ printf("%d", i); i++; }

123

0123

321

Error

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Find the error: for(i=0;i<5;i++) printf(i);

Missing header

Wrong printf usage

Infinite loop

No error

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Predict the output: int a[]={1,2,3}; printf("%d", a[1]);

1

2

3

Error

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?