What is the output of this code?
a,b=1,0
a=a^b
b=a^b
a=a^b
print(a)
diff 1 set
Quiz
•
Business
•
University
•
Hard
Smiley Sunshine
Used 1+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of this code?
a,b=1,0
a=a^b
b=a^b
a=a^b
print(a)
0
1
2
This code will raise a runtime error
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will be the output of the following Python code?
i = 1
while True:
if i%3 == 0:
break
print(i)
i + = 1
1 2 3
error
1 2
none of the mentioned
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of the following is FALSE about arrays in Java?
A java array is always an object
Length of array can be changed after creation of array
Arrays in Java are always allocated on heap
Arrays in Java are not allocated on heap
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output?
package main;
class T {
int t = 20;
}
class Main {
public static void main(String args[]) {
T t1 = new T();
System.out.println(t1.t);
}
}
0
20
Compiler error
40
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the output:
class Main {
public static void main(String args[]) {
int t;
System.out.println(t); }
}
0
garbage value
compiler error
runtime error
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the logo
Mini Cooper
Aston Martin
Bentley
Mazda
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Predict the logo
Dr Reddy's
Piramal
Bharat Biotech
Sun Pharma
15 questions
OPERATION MANAGEMENT
Quiz
•
University
10 questions
Pengajian Perniagaan Penggal 1 : PROSES
Quiz
•
University
15 questions
Mastering Excel Logical Functions
Quiz
•
University
10 questions
BT_M2_2023
Quiz
•
University
12 questions
ALPRO PERTEMUAN 3
Quiz
•
University
10 questions
bt2 2023
Quiz
•
University
10 questions
bt_m -1 2023
Quiz
•
University
10 questions
BT - M4 - 2023
Quiz
•
University
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