coding

coding

University

30 Qs

quiz-placeholder

Similar activities

Computer Programming-2

Computer Programming-2

University

30 Qs

Operators

Operators

University

32 Qs

2nd Class Test FEB 2021

2nd Class Test FEB 2021

University

25 Qs

Debugging Showdown

Debugging Showdown

University

25 Qs

Quiz # 3- Computer Programming 2

Quiz # 3- Computer Programming 2

University

30 Qs

Code Clash

Code Clash

University

30 Qs

IEEE Coding Cybersecurity

IEEE Coding Cybersecurity

University

27 Qs

Types and IO in C++

Types and IO in C++

University - Professional Development

26 Qs

coding

coding

Assessment

Quiz

Computers

University

Medium

Created by

samrudhi pawar

Used 1+ times

FREE Resource

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

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?