The ?: operator is called ternary operator , because it operates on

VCE TalentNext-2021 Quiz-2

Quiz
•
Computers, Professional Development
•
Professional Development
•
Hard
RAMESH ADAVELLI
Used 17+ times
FREE Resource
20 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
One operand
Two operands
Three operands
Any number of operands
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the output of the following code?
int num = false?10:20;
System.out.println(num);
10
20
Compile time Error
num must be of boolean type
3.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the following code?
String name = "java";
int marks = name == "java"?10:20;
System.out.println( marks);
10
20
Invalid Assignment
No output
4.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the following code?
int a = 20, b=30;
boolean result = a&b?true:false;
System.out.println(result);
true
false
Compile Time Error
20
5.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the following code?
int a = 4, b=7;
int result = (true?a&b:a|b)<3?120:150;
System.out.println(result);
4
7
120
150
6.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of the following code?
int n=7;
while(n)
{
System.out.println("TalentNext -2021");
}
Prints TalentNext-2021 and terminates
Prints TalentNext-2021 indefinite times
Compile Time Error
No output
7.
MULTIPLE CHOICE QUESTION
45 sec • 1 pt
What is the output of following code snippet?
int num=40;
if(num >= 40);
System.out.print("ECE ");
System.out.println("EEE");
ECE
EEE
ECE EEE
No Output
Create a free account and access millions of resources
Similar Resources on Quizizz
21 questions
Java Quiz on Module 1 & 2

Quiz
•
Professional Development
25 questions
PSUEDOCODE 2 CAPGEMINI

Quiz
•
Professional Development
25 questions
AP CSA Unit 1&2 Test

Quiz
•
8th Grade - Professio...
22 questions
Java Chapter 2 Review Questions

Quiz
•
Professional Development
15 questions
Computación básica - Conceptos básicos

Quiz
•
Professional Development
15 questions
Python Class 1

Quiz
•
Professional Development
16 questions
Final Assessment

Quiz
•
Professional Development
24 questions
Julia - Quiz 1

Quiz
•
Professional Development
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