C Language MCQ - English
Consider the following program segment: main()
The correct values are:
{
int a,b,c;
b=3;
a=2;
a=2*(b++);
c=2*(++b);
}
a=6, c=8
a=6, b=3
b=3, c=6
a=6, c=10
Answer : D
View More Related Question
1) Pick up the odd one out from the following
2) What is the output of this C code?
#include <stdio.h>
int main()
{
int i = -5;
i = i / 3;
printf("%d
", i);
return 0;
}
3) What should be the value of i and k at the end of the following program segments? int i,j,k;
{
j=5;
i=2*j/2;
k=2*(j/2);
}
4) Which of the following is not logical operator?
5) In mathematics and computer programming, which is the correct order of mathematical operators ?
Addition, Subtraction, Multiplication, Division
Division, Multiplication, Addition, Subtraction
Multiplication, Addition, Division, Subtraction
Addition, Division, Modulus, Subtraction
View Answer