DSA + System Design - 6

DSA + System Design - 6

Professional Development

11 Qs

quiz-placeholder

Similar activities

процедуры и функции

процедуры и функции

Professional Development

14 Qs

Supervised and unsupervised learning

Supervised and unsupervised learning

Professional Development

15 Qs

Level1 session 2 M.walid & Omar Bounce

Level1 session 2 M.walid & Omar Bounce

Professional Development

8 Qs

Scheme logice si limbaj pseudocod 2

Scheme logice si limbaj pseudocod 2

Professional Development

6 Qs

PostTest ToT bagi Guru Pembina OSN Komputer Tahun 2021

PostTest ToT bagi Guru Pembina OSN Komputer Tahun 2021

Professional Development

15 Qs

Tema 2- Documentos

Tema 2- Documentos

Professional Development

10 Qs

Basic Technology

Basic Technology

Professional Development

10 Qs

Eletricidade - geradores e receptores elétricos

Eletricidade - geradores e receptores elétricos

Professional Development

6 Qs

DSA + System Design - 6

DSA + System Design - 6

Assessment

Quiz

Computers

Professional Development

Medium

Created by

Puneet Kansal

Used 1+ times

FREE Resource

11 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following expressions correctly checks if a number n is a power of two?

n & (n - 1) == 0

n & (n + 1) == 0

n | (n - 1) == 0

n ^ (n - 1) == 0

2.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the bitwise NOT operation (~) do to the binary representation of a number?

Inverts the bits

Shifts the bits to the right

Shifts the bits to the left

Sets all bits to 1

3.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What does the expression (x >> 1) do to the integer x?

Divides x by 2

Multiplies x by 2

Adds 2 to x

Subtracts 2 from x

4.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which of the following is true for any integer n when n is even?

n & 1 == 1

n & 1 == 0

n | 1 == 0

n ^ 1 == 0

5.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the binary result of the expression 5 ^ 3?

0001

0010

0110

1000

6.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

Which operation would you use to swap the values of two variables a and b without using a temporary variable?

a = a ^ b; b = a ^ b; a = a ^ b

a = a & b; b = a & b; a = a & b

a = a | b; b = a | b; a = a | b

a = a + b; b = a - b; a = a - b

7.

MULTIPLE CHOICE QUESTION

45 sec • 1 pt

What is the result of 7 | 2 in binary?

0001

0010

0111

1110

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?