Learn2Code-17-09-2025

Learn2Code-17-09-2025

Professional Development

•

30 Qs

quiz-placeholder

Similar activities

Module 3 - Introduction to Embedded Systems

Module 3 - Introduction to Embedded Systems

Professional Development

•

30 Qs

Exploring Python Basics and Libraries

Exploring Python Basics and Libraries

Professional Development

•

25 Qs

Cuestionario sobre Numpy

Cuestionario sobre Numpy

Professional Development

•

26 Qs

Quiz on Window Functions

Quiz on Window Functions

Professional Development

•

25 Qs

FT-3

FT-3

Professional Development

•

25 Qs

Quiz Baja dan Besi

Quiz Baja dan Besi

Professional Development

•

25 Qs

MySQL Commands and Data Types Quiz

MySQL Commands and Data Types Quiz

Professional Development

•

30 Qs

PROGRAMMING IN C MCQ

PROGRAMMING IN C MCQ

Professional Development

•

30 Qs

Learn2Code-17-09-2025

Learn2Code-17-09-2025

Assessment

Quiz

•

Engineering

•

Professional Development

•

Practice Problem

•

Hard

Created by

arun h

Used 2+ times

FREE Resource

AI

Enhance your content in a minute

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

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the output of the following program?

#include <stdio.h>
int main() {
int i;
for (i = 0; i < 5; i++);
printf("%d ", i);
return 0;
}

Prints 0 1 2 3 4

Prints 5 only

Infinite loop

Compilation error

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the result of executing the following code?

#include <stdio.h>
int main() {
    for (int j = 0; j < 3; j++) {
        printf("Hello World\n");
    }
    return 0;
}

Hello World Hello World Hello World

3 times Hello World

Compilation error

Hello World

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the result of the following code?

#include <stdio.h>

int main() {

int a = 10, b = 0;

printf("%d", a / b);

return 0;

}

0

10

Runtime error (division by zero)

Compilation error

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will happen when you run this program?

#include <stdio.h>

int main() {

int arr[5] = {1, 2, 3, 4, 5};

printf("%d", arr[5]);

return 0;

}

Output is 5

Output is 0

Undefined behavior / garbage value

Compilation error

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What’s wrong in the following code?

#include <stdio.h>

int main() {

int i = 1;

while (i <= 5) {

printf("%d ", i);

}

return 0;

}

Infinite loop

Compilation error

Prints 1 to 5

Prints 1 repeatedly and exits

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of this code?

#include <stdio.h>

int main() {

int a = 7;

if (a = 10) {

printf("Condition is true\n");

}

return 0;

}

Condition is true

Compilation error

Condition is false

No output

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will this code print?

#include <stdio.h>

int main() {

int a = 5;

printf("%d\n", a++ + ++a);

return 0;

}

11

12

Undefined behavior

Compilation 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

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?