Search Header Logo

C Programming MCQ Quiz

Authored by Manjunatha M

Information Technology (IT)

12th Grade

C Programming MCQ Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How many times "ASOFTLAB" is get printed? #include int main() { int x; for(x=-1; x<=10; x++) { if(x < 5) continue; else break; printf("ASOFTLAB"); } return 0; }

Infinite times

11 times

0 times

10 times

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

In mathematics and computer programming, which is the correct order of mathematical operators?

Addition, Subtraction, Multiplication, Division

Division, Multiplication, Addition, Subtraction

Multiplication, Addition, Division, Subtraction

Addition, Division, Modulus, Subtraction

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following C program? #include int main() { printf("%lu", sizeof(int)); return 0; }

2

4

8

16

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following program? #include main() { printf("\"); }

- \

- "

- "

- Compile error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Compiler generates ___ file.

- Executable code

- Object code

- Assembly code

- None of the above.

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

The return keyword used to transfer control from a function back to the calling function.

- Yes

- Switch

- go back

- goto

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following code snippet? #include main() { int const a = 5; a++; printf("%d",a); }

- 5

- 6

- Runtime error

- Compile 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

Microsoft

Continue with Microsoft

or continue with

Facebook

Facebook

Apple

Apple

Others

Others

By signing up, you agree to our Terms of Service & Privacy Policy

Already have an account?