C Programming Quiz2

C Programming Quiz2

University

15 Qs

quiz-placeholder

Similar activities

C Programming Basics

C Programming Basics

University

10 Qs

Module01_C_M_M&A

Module01_C_M_M&A

University

15 Qs

Output Prediction in C

Output Prediction in C

University

20 Qs

Mapil

Mapil

University

10 Qs

C Programming Quiz - 1

C Programming Quiz - 1

University

20 Qs

C classroom activity 8.4.25

C classroom activity 8.4.25

University

20 Qs

TECH WHIZ

TECH WHIZ

University

15 Qs

Quiz Round For Group 1

Quiz Round For Group 1

University

20 Qs

C Programming Quiz2

C Programming Quiz2

Assessment

Quiz

Engineering

University

Hard

Created by

Sunil Kumar

Used 3+ times

FREE Resource

15 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Media Image

What would be output:

12

16

18

12

16

20

12

16

17

11

12

20

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is #include <stdio.h>?

Preprocessor directive

Inclusion directive

File inclusion directive

None

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

  1. #include <stdio.h>

  2. int main()

  3. {

  4. int y = 10000;

  5. int y = 34;

  6. printf("Hello World! %d\n", y);

  7. return 0;

  8. }

Compile time error

10000
Hello World!
int y = 50;

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

for(x = 1; x = 3; x++)

How many times above loop would run?

4

Never

3

5

5.

MULTIPLE CHOICE QUESTION

2 mins • 1 pt

#include<stdio.h>

void main() {
int num = 0;
do {
- - num;
printf(“%d”, num);
num ++;
}
while(num >= 0);
}

A run time error will be reported

The program will not enter into the loop

The loop will run infinitely many times

Compile time error

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include <stdio.h>

int main() {
  int value = 0;
  if(value)
    printf("well done");
  printf("Algbly");
  return 0;
}
What would be output:

well done
good job
successfully completed
Algbly

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

  1. #include <stdio.h>

  2. int main()

  3. {

  4. int i = 0;

  5. int x = i++, y = ++i;

  6. printf("%d % d\n", x, y);

  7. return 0;

  8. }

    What would be output:

0 2
1 3
0 1
1 2

Create a free account and access millions of resources

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?