Search Header Logo

Quiz1

Authored by SECE IT

Computers

University

Used 1+ times

Quiz1
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code?

  1. #include <stdio.h>

  2. void main()

  3. {

    1. int a = 3;

  4. int b = ++a + a++ + --a;

  5. printf("Value of b is %d", b);

  6. }

Value of b is 12

Value of b is 13

Value of b is 10

Undefined behaviour

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is not an arithmetic operation?

a * = 10;

a / = 10;

a ! = 10;

a % = 10;

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a valid way to declare a variable in C?

int 1a = 5;

float a_1 = 5.0;

char a-b = 'c';

double a@ = 3.14;

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code?

  1. #include <stdio.h>

  2. void main()

  3. {

    1. int x = 5;

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

  5. }

11

12

10

Undefined behaviour

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following operators has the highest precedence in C?

+

*

-

/

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code?

  1. #include <stdio.h>

  2. void main()

  3. {

    1. int y = 10;

  4. printf("%d", --y + y--);

  5. }

19

18

20

Undefined behaviour

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which of the following is a correct way to define a function in C?

void myFunction() {}

function myFunction() {}

myFunction() void {}

def myFunction() {}

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?