Search Header Logo

2nd C Programming Quiz

Authored by Tech Ninjas

Computers

University

Used 15+ times

2nd C Programming Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

50 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include<stdio.h>

int main()

{

function();

return 0;

}

void function()

{

printf("Function in C is awesome");

}

Function in C is awesome

No output

Runtime Error

Compilation Error

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the C program?


#include<stdio.h>

a()

{

printf("Function");

}

b()

{

printf("Function in C");

}

c()

{

printf("C function");

}

main()

{

int (*ptr[3])();

ptr[0] = a;

ptr[1] = b;

ptr[2] = c;

ptr[2]();

return 0;

}

Function

Function in C

C Function

None of the above

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the Output of this?

#include<stdio.h>

int function();

main()

{

int i;

i = function();

printf("%d", i);

return 0;

}

function()

{

int a;

a = 250;

return 0;

}

Runtime Error

0

250

No Output

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the C program?


#include<stdio.h>

int main(){

printf("%p",main);

return 0;

}

Address

Compilation Error

Garbage Value

Runtime Error

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

What is the output?

72 72 72

72 110 48

Compilation error

No output

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the C program?


#include<stdio.h>

enum colors {apple,orange,mango};

int main()

{

printf("%d %d %d",mango,apple,orange);

return 0;

}

3 1 2

2 0 1

0 1 2

1 0 2

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Media Image

4 4

8 8

Error

4 8

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?

Discover more resources for Computers