Question: What is the output of the following code snippet?
int a = 5, b = 10;
int result = a & b;
printf("%d", result);

coding 1

Quiz
•
Computers
•
University
•
Hard
svh almas
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
a) 0
b) 5
c) 10
d) 15
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
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
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
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
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
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
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
Similar Resources on Quizizz
10 questions
IT Quiz Round 3

Quiz
•
University
10 questions
java quiz on Encapsulation and Abstraction

Quiz
•
University
10 questions
C++ vs Python: A Quiz Introduction

Quiz
•
11th Grade - University
10 questions
Variables

Quiz
•
University
10 questions
Python - Functions

Quiz
•
University
14 questions
Java Operators

Quiz
•
University
12 questions
C Basics

Quiz
•
University
10 questions
Java Arrays

Quiz
•
University
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade