Quiz1

Quiz1

University

10 Qs

quiz-placeholder

Similar activities

C Practice Test 1

C Practice Test 1

University

12 Qs

Programming 1

Programming 1

University

10 Qs

Printf, scanf

Printf, scanf

University

12 Qs

Quiz on Basics of C

Quiz on Basics of C

University

10 Qs

Programming practices - C programming

Programming practices - C programming

University

9 Qs

Day 1 Quiz

Day 1 Quiz

11th Grade - University

12 Qs

TECHNICAL C JIT03

TECHNICAL C JIT03

University

15 Qs

PK (A) - PRE TEST 1

PK (A) - PRE TEST 1

University

10 Qs

Quiz1

Quiz1

Assessment

Quiz

Computers

University

Medium

Created by

SECE IT

Used 1+ times

FREE Resource

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() {}

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?