Q1easy
What does performing a Bitwise Left Shift (<<) by 2 positions do to an integer?
Topic-wise practice questions for Programming (C++ / Java / Python). Test your knowledge, check solutions on demand, and pace your preparation.
int x = 5;
if (x = 0) {
print("Zero");
} else {
print("Non-Zero");
}
In C/C++, what is the output?
int val = 8;
val >>= 2;
int x = 10;
int y = x++;
int ans = 10 % 3 + 4 << 1;
int x = 10;
int y = 20;
print(x > 5 && y < 15 ? "Alpha" : "Beta");
int i = 5;
int j = ++i + i++;
print(j);