Programming Lab Quiz

Programming Lab Quiz

University

20 Qs

quiz-placeholder

Similar activities

C Programming Quiz

C Programming Quiz

12th Grade - University

20 Qs

BASIC C PROGRAMMING QUIZ

BASIC C PROGRAMMING QUIZ

University

15 Qs

Unit-2 Test-2

Unit-2 Test-2

University

15 Qs

Structures and union

Structures and union

University

15 Qs

C Programming Quiz(session 1)

C Programming Quiz(session 1)

University

20 Qs

Quiz - I

Quiz - I

University - Professional Development

25 Qs

Unit-2 Test-1

Unit-2 Test-1

University

20 Qs

C Programming Assessment-1

C Programming Assessment-1

University

20 Qs

Programming Lab Quiz

Programming Lab Quiz

Assessment

Quiz

Computers

University

Hard

Created by

Yash Sinha

Used 1+ times

FREE Resource

20 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which is valid C expression?

int my_num = 100,000;

int my_num = 100000;

int my num = 1000;

int $my_num = 10000;

2.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is the result of logical or relational expression in C?

True or False

0 or 1

0 if an expression is false and any positive number if an expression is true

None of the mentioned

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What is an example of iteration in C?

for

while

do-while

all of the mentioned

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code? #include int main() { int y = 10000; int y = 34; printf("Hello World! %d\n", y); return 0; }

Compile time error

Hello World! 34

Hello World! 1000

Hello World! followed by a junk value

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will happen if the following C code is executed? #include int main() { int main = 3; printf("%d", main); return 0; }

It will cause a compile-time error

It will cause a run-time error

It will run without any error and prints 3

It will experience infinite looping

6.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code? #include void main() { int x = 5; if (x < 1); printf("Hello"); }

Nothing

Run time error

Hello

Varies

7.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code? (Assuming that we have entered the value 1 in the standard input) #include void main() { int ch; printf("enter a value between 1 to 2:"); scanf("%d", &ch); switch (ch) { case 1: printf("1\n"); default: printf("2\n"); } }

1

2

1 2

Run time error

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?