C- Operators

C- Operators

University

10 Qs

quiz-placeholder

Similar activities

IPC144 SLG -- Week2

IPC144 SLG -- Week2

University

9 Qs

ROUND 2

ROUND 2

University

10 Qs

Unit 3 C Pro P1

Unit 3 C Pro P1

University

8 Qs

some questions

some questions

11th Grade - University

8 Qs

Macro and Macro preprocessor

Macro and Macro preprocessor

University

10 Qs

Skill Development - Debugging Practice1

Skill Development - Debugging Practice1

10th Grade - Professional Development

10 Qs

Basics of C

Basics of C

University

10 Qs

Cơ sở lập trình_chương 4

Cơ sở lập trình_chương 4

University

15 Qs

C- Operators

C- Operators

Assessment

Quiz

Computers

University

Hard

Created by

sobha xavier

Used 3+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

  1. #include <stdio.h>

  2. void main()

  3. {

  4. int a = 3;

  5. int b = ++a ;

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

  7. }

3

4

error

undefined

2.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

What is the precedence of arithmetic operators (from highest to lowest)?




a) %, , /, +, –

b) %, +, /, , –

c) +, -, %, , /

d) %, +, -, , /

3.

MULTIPLE CHOICE QUESTION

20 sec • 1 pt

Which of the following data type will throw an error on modulus operation(%)?

float

int

short

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the output of the following C code?

  1. #include <stdio.h>

  2. int main()

  3. {

  4. int a = 10, b = 5, c = 5;

  5. int d;

  6. d = a == (b + c);

  7. printf("%d", d);

  8. }

Error

1

10

0

5.

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

  4. int x = 1, y = 0, z = 5;

  5. int a = x && y || z++;

  6. printf("%d", z);

  7. }

a) 6

b) 5

c) 0

d) Varies

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What will be the final value of d in the following C code?

  1. #include <stdio.h>

  2. int main()

  3. {

  4. int a = 10, b = 5, c = 5;

  5. int d;

  6. d = b + c == a;

  7. printf("%d", d);

  8. }

a) Syntax error

b) 1

c) 5

d) 10

7.

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

  4. int k = 8;

  5. int x = 0 == 1 && k++;

  6. printf("%d%d\n", x, k);

  7. }

a) 0 9

b) 0 8

c) 1 8

d) 1 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?