Which of these statements are incorrect?
The left shift operator, <<, shifts all of the bits in a value to the left specified number of times
The right shift operator, >>, shifts all of the bits in a value to the right specified number of time
The left shift operator can be used as an alternative to multiplying by 2
The right shift operator automatically fills the higher order bits with 0
Quiz Recommendation System API Link - https://fresherbell-quiz-api.herokuapp.com/fresherbell_quiz_api
# | Quiz |
---|---|
1
Discuss
|
What will be the output of the following Java code?
Solution |
2
Discuss
|
With x = 0, which of the following are legal lines of Java code for changing the value of x to 1? 1. x++; 2. x = x + 1; 3. x += 1; 4. x =+ 1;
Solution |
3
Discuss
|
Which of these is returned by “greater than”, “less than” and “equal to” operators?
Solution |
4
Discuss
|
What is the order of precedence (highest to lowest) of following operators? 1. & 2. ^ 3. ?:
Solution |
5
Discuss
|
Which operator is used to invert all the digits in a binary representation of a number?
Solution |
6
Discuss
|
What will be the output of the following Java program?
Solution |
7
Discuss
|
Which of these is not a bitwise operator?
Solution |
8
Discuss
|
Which of the following operators can operate on a boolean variable? 1. && 2. == 3. ?: 4. +=
Solution |
9
Discuss
|
Which of these have highest precedence?
Solution |
10
Discuss
|
What will be the output of the following Java program?
Solution |
# | Quiz |
Copyright © 2020 Inovatik - All rights reserved