Question
#include <stdio.h>
int main()
{
int i, n, a = 4;
scanf("%d", &n);
for (i = 0; i < n; i++)
a = a * 2;
}
a.
Logical Shift left
b.
No output
c.
Arithmetic Shift right
d.
Bitwise exclusive OR
Posted under C Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. Comment on the output of this C code? #include <stdio.h> int main() { int i, n, a = 4; scanf("%d", &n); for (i = 0; i < n; i++)...
Similar Questions
Discover Related MCQs
Q. What is the type of the below assignment expression if x is of type float, y is of type int?
y = x + y;
View solution
Q. What is the value of the below assignment expression
(x = foo())!= 1 considering foo() returns 2
View solution
Q. Operation “a = a * b + a” can also be written as:
View solution
Q. for c = 2, value of c after c <<= 1;
View solution
Q. Which of the following is an invalid assignment operator?
View solution
Q. For initialization a = 2, c = 1 the value of a and c after this code will be
c = (c) ? a = 0 : 2;
View solution
Q. What will be the data type of the expression
(a < 50) ? var1 : var2;
provided a = int, var1 = double, var2 = float
View solution
Q. Which expression has to be present in the following?
exp1 ? exp2 : exp3;
View solution
Q. Value of c after the following expression (initialization a = 1, b = 2, c = 1):
c += (-c) ? a : b;
View solution
Q. Comment on the following expression?
c = (n) ? a : b; can be rewritten as
View solution
Q. In expression i = g() + f(), first function called depends on
View solution
Q. Which of the following operators has an associativity from Right to Left?
View solution
Q. Which operators of the following have same precedence?
P. "!=", Q. "+=", R. "<<="
View solution
Q. Comment on the following statement?
n = 1;
printf("%d, %dn", 3*n, n++);
View solution
Q. Which of the following option is the correct representation of the following code?
e = a * b + c / d * f;
View solution
Q. What care must be taken during swapping 2 numbers?
b = (b / a);
a = a * b;
b = a / b;
View solution
Q. Which of the following is the correct order of evaluation for the given expression?
a = w % x / y * z;
View solution
Q. Which function in the following expression will be called first?
a = func3(6) - func2(4, 5) / func1(1, 2, 3);
View solution
Q. Which of the following operator has the highest precedence in the following?
View solution
Q. Which of the following is a ternary operator?
View solution
Suggested Topics
Are you eager to expand your knowledge beyond C Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!