IEEE VEC SB

IEEE VEC SB

University

30 Qs

quiz-placeholder

Similar activities

Estructura de Datos

Estructura de Datos

University

25 Qs

Java Lab

Java Lab

University

25 Qs

Decision and Case Control Statements in C

Decision and Case Control Statements in C

University

35 Qs

C-Programming

C-Programming

University

30 Qs

C Language Pre-Assessment

C Language Pre-Assessment

University

25 Qs

Arrays in Java

Arrays in Java

University

25 Qs

Aptitude Competition(FY)

Aptitude Competition(FY)

University

25 Qs

C pro test

C pro test

8th Grade - Professional Development

35 Qs

IEEE VEC SB

IEEE VEC SB

Assessment

Quiz

Computers

University

Hard

Created by

Ruthvik Vr

FREE Resource

30 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Question 1: What is the output of the following code?

c

#include <stdio.h>

int main() {

int x = 5;

int y = x++;

printf("%d", y);

return 0;

}

A) 5

B) 6

C) 7

D)8

Answer explanation

a

2.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Question 2: What will be the value of 'y' after this code is executed?

c

#include <stdio.h>

int main() {

int x = 3;

int y = x++ + ++x;

printf("%d", y);

return 0;

}

A) 6

B) 7

C) 8

D) 10

3.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Question 3: What is the output of the following code?

c

#include <stdio.h>

int main() {

int x = 5;

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

return 0;

}

A) 4

B) 5

C) 7

D) 9

4.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Question 4: What is the output of the following code?

c

#include <stdio.h>

int main() {

int x = 5;

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

return 0;

}

A) 5

B)6

C) 7

D) 111

5.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Question 5: What is the size of the character array "str" in bytes in the following code?

c

#include <stdio.h>

int main() {

char str[] = "Hello, World!";

printf("%d", sizeof(str));

return 0;

}

A) 12

B) 14

C) 13

6.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Question 6: What is the value of 'x' after this code is executed?

c

#include <stdio.h>

int main() {

int x = 5;

x *= x + 1;

printf("%d", x);

return 0;

}

A) 25

B) 30

C) 35

7.

MULTIPLE CHOICE QUESTION

10 sec • 1 pt

Question 7: What is the value of 'y' after this code is executed?

c

#include <stdio.h>

int main() {

int x = 10;

int y = x > 5 ? x++ : x--;

printf("%d", y);

return 0;

}

V

A) 10

B) 11

C) 9

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?