coding 1

coding 1

University

10 Qs

quiz-placeholder

Similar activities

Python - Functions

Python - Functions

University

10 Qs

Array in C

Array in C

University

10 Qs

C Language Quiz-1

C Language Quiz-1

University - Professional Development

15 Qs

Java Operators

Java Operators

University

14 Qs

C programming-1

C programming-1

University

13 Qs

Week 9 - Functions and Pointers

Week 9 - Functions and Pointers

University

14 Qs

C Basics

C Basics

University

12 Qs

Topic 8-2: Method

Topic 8-2: Method

University

9 Qs

coding 1

coding 1

Assessment

Quiz

Computers

University

Hard

Created by

svh almas

Used 1+ times

FREE Resource

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

    int a = 5, b = 10;

    int result = a & b;

    printf("%d", result);

a) 0

b) 5

c) 10

d) 15

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Question: Which of the following operators is used for floor division in Python?

a) /

b) //

c) %

c) %

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

    int a = 10; int b = 20; int result = a + b * 2; System.out.println(result);

a) 60

b) 50

c) 30

d) 40

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Question: What is the difference between a++ and ++a?

a) No difference

b) a++ increments a by 2, ++a increments a by 1

c) a++ returns the current value and then increments, whereas ++a increments first and then returns the new value.

d) Both decrement a

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Question: What will be the output of the following code snippet?

    int a = 5;

    int b = ++a * 2;

    printf("%d\n", b);

a) 10

b) 12

c) 8

d) 6

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Question: What is the result of 5 | 3 in binary?

A) 101

B) 110

C) 111

D) 100

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

  1. Question: Which of the following statements about the modulo operator (%) is true?

A) It returns the quotient of a division operation.

B) It returns the remainder of a division operation.

C) It returns the product of a multiplication operation.

D) It returns the result of a subtraction operation.

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?