C Programming Lab Quiz 1

C Programming Lab Quiz 1

University

24 Qs

quiz-placeholder

Similar activities

MATLAB Fundamentals Worksheet Questions

MATLAB Fundamentals Worksheet Questions

University

20 Qs

Untitled Quiz

Untitled Quiz

1st Grade - University

20 Qs

GREEN TECHNOLOGY COMPLIANCE

GREEN TECHNOLOGY COMPLIANCE

University

20 Qs

LEVELLING FOR CIVIL ENGINEERING

LEVELLING FOR CIVIL ENGINEERING

University

20 Qs

Quiz Pemrograman Arduino

Quiz Pemrograman Arduino

11th Grade - University

20 Qs

WSN ISE- II (2025-26)

WSN ISE- II (2025-26)

University

20 Qs

Unidad 3 Posición Orbital Función del Tiempo

Unidad 3 Posición Orbital Función del Tiempo

University

20 Qs

Artificial Intelligence CT-4

Artificial Intelligence CT-4

University

20 Qs

C Programming Lab Quiz 1

C Programming Lab Quiz 1

Assessment

Quiz

Engineering

University

Practice Problem

Hard

Created by

Sunil Kumar

Used 1+ times

FREE Resource

AI

Enhance your content in a minute

Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...

24 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Identify the option that does not represent a logical operator:

&& 

|| 

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid C expression for declaring an integer variable?

int my_num = 100,000;

int my_num = 100000;

int my num = 1000;

int $my_num = 10000;

3.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

Which for loop has range of similar indexes of ‘i’ used in for (i = 0;i < n; i++)?

for (i = n; i>0; i--)

for (i = n; i >= 0; i--)

for (i = n-1; i>0; i--)

for (i = n-1; i>-1; i--)

4.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

What will be the output of the following C code?

#include <stdio.h>

void main()

{

double k = 0;

for (k = 0.0; k < 3.0; k++)

printf("Hello");

}

Run time error

Hello is printed thrice

Hello is printed twice

Hello is printed infinitely

5.

MULTIPLE CHOICE QUESTION

1 min • 1 pt

#include<stdio.h>

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

Infinite loop printing 0
Prints numbers from 0 to 10
Prints -1 and exits immediately
Infinite loop printing -1

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the value of ‘grade’ after the switch statement is executed?

#include<stdio.h>

int marks = 80;
switch(marks) {
  case 60:
    grade = ‘C’;
    break;
  case 70:
    grade = ‘B’;
    break;
  case 80:
    grade = ‘A’;
    break;
  default:
    grade = ‘E’;

C
B
D
A

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

If switch feature is used, then

Default case must be present

Default case, if used, should be the last case

Default case, if used, can be placed anywhere

None of the above

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?