coding

coding

University

30 Qs

quiz-placeholder

Similar activities

Intro PseInt

Intro PseInt

University

25 Qs

CSS - Cascading Style Sheets

CSS - Cascading Style Sheets

University

25 Qs

Data Structure(FINAL)

Data Structure(FINAL)

University

25 Qs

Compro. Final 1/64 part1

Compro. Final 1/64 part1

University

25 Qs

Algorytmy i jezyki programowania

Algorytmy i jezyki programowania

4th Grade - University

25 Qs

Quiz - I

Quiz - I

University - Professional Development

25 Qs

CCC11 Chapter 3 - Word Processing

CCC11 Chapter 3 - Word Processing

University

25 Qs

แบบทดสอบ หลังการอบรม Google Apps

แบบทดสอบ หลังการอบรม Google Apps

University

30 Qs

coding

coding

Assessment

Quiz

Computers

University

Practice Problem

Medium

Created by

samrudhi pawar

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

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int a = 5;

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

return 0;

}

11

12

10

Undefined behavior

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

printf("%c", 'A' + 3);

return 0;

}

A

B

C

D

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int a=10, b=30;

// swapping

// a = (initial_a - initial_b)

a = a - b;

// b = (initial_a - initial_b) + initial_b = initial_a

b = a + b;

// a = initial_a - (initial_a - initial_b) = initial_b

a = b - a;

// %.2lf displays numbers up to 2 decimal places

printf("After swapping, a = %d", a);

printf("After swapping, b = %d", b);

return 0;

}

a=30 ,b=10

After swapping, a = 30

after swapping, b=10

After swapping, a = 30After swapping, b = 10

swapping a=10,b=20

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

char str[] = "CSE";

printf("%s", str+2);

return 0;

}

CSE

SE

E

CS

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

printf("%d", sizeof('A'));

}

1

2

4

Compiler dependent

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

int x = 0;

if(x = 5)

printf("Hello");

else

printf("Bye");

}

Hello

Bye

Compiler error

Nothing

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

#include <stdio.h>

int main() {

for(int i=0; i<5; i++);

printf("Done");

}

Done 5 times

Done once

Compile error

Done 4 times

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?