In an expression involving || operator, evaluation
I. Will be stopped if one of its components evaluates to false
II. Will be stopped if one of its components evaluates to true
III. Takes place from right to left
IV. Takes place from left to right
In an expression involving || operator, evaluation
I. Will be stopped if one of its components evaluates to false
II. Will be stopped if one of its components evaluates to true
III. Takes place from right to left
IV. Takes place from left to right
Which of the following operator takes only integer operands?
Which of the following operator takes only integer operands?
void main()
{
int a=10, b;
b = a++ + ++a;
printf("%d %d %d %d", b, a++, a, ++a);
}
what will be the output when following code is executed?
void main()
{
int a=10, b;
b = a++ + ++a;
printf("%d %d %d %d", b, a++, a, ++a);
}
what will be the output when following code is executed?
Which operator has the lowest priority?
Which operator has the lowest priority?
Find the output of the following program.
#include<stdio.h>
void main()
{
int y=10;
if(y++>9 && y++!=11 && y++>11)
printf("%d", y);
else
printf("%d", y);
}
Find the output of the following program.
#include<stdio.h>
void main()
{
int y=10;
if(y++>9 && y++!=11 && y++>11)
printf("%d", y);
else
printf("%d", y);
}
What number will z in the sample code given below?
int z, x=5, y= -10, a=4, b=2;
z = x++ - --y*b/a;
What number will z in the sample code given below?
int z, x=5, y= -10, a=4, b=2;
z = x++ - --y*b/a;
What is the output of the following statements?
int i = 0;
printf("%d %d", i, i++);
What is the output of the following statements?
int i = 0;
printf("%d %d", i, i++);
What will be the output of the following code fragment?
void main()
{
printf("%x",-1<<4);
}
What will be the output of the following code fragment?
void main()
{
printf("%x",-1<<4);
}
Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?
Given b=110 and c=20, what is the value of 'a' after execution of the expression a=b-=c*=5?
Which of the following comments about the ++ operator are correct?
Which of the following comments about the ++ operator are correct?
What will be the output?
void main(){
int a=10, b=20;
char x=1, y=0;
if(a,b,x,y){
printf("EXAM");
}
}
What will be the output?
void main(){
int a=10, b=20;
char x=1, y=0;
if(a,b,x,y){
printf("EXAM");
}
}
Which operator from the following has the lowest priority?
Which operator from the following has the lowest priority?
Determine output:
void main()
{
int c = - -2;
printf("c=%d", c);
}
Determine output:
void main()
{
int c = - -2;
printf("c=%d", c);
}
Identify the correct output of the following code:
void main()
{
int w=10, x=5, y=3, z=3;
if( (w < x ) && (y=z++) )
printf("%d %d %d %d", w, x, y, z);
else
printf("%d %d %d %d", w, x, y, z);
}
Identify the correct output of the following code:
void main()
{
int w=10, x=5, y=3, z=3;
if( (w < x ) && (y=z++) )
printf("%d %d %d %d", w, x, y, z);
else
printf("%d %d %d %d", w, x, y, z);
}
Consider the following program fragment, and choose the correct one
void main()
{
int a, b = 2, c;
a = 2 * (b++);
c = 2 * (++b);
}
Consider the following program fragment, and choose the correct one
void main()
{
int a, b = 2, c;
a = 2 * (b++);
c = 2 * (++b);
}
Determine output of the following program code.
#include<stdio.h>
void main()
{
int a, b=7;
a = b<4 ? b<<1 : ++b>4 ? 7>>1 : a;
printf("%d %d", a, b);
}
Determine output of the following program code.
#include<stdio.h>
void main()
{
int a, b=7;
a = b<4 ? b<<1 : ++b>4 ? 7>>1 : a;
printf("%d %d", a, b);
}
What will be the output of this program on an implementation where int occupies 2 bytes?
#include <stdio.h>
void main()
{
int i = 3;
int j;
j = sizeof(++i + ++i);
printf("i=%d j=%d", i, j);
}
What will be the output of this program on an implementation where int occupies 2 bytes?
#include <stdio.h>
void main()
{
int i = 3;
int j;
j = sizeof(++i + ++i);
printf("i=%d j=%d", i, j);
}
What is the output of the following statements?
int b=15, c=5, d=8, e=8, a;
a = b>c ? c>d ? 12 : d>e ? 13 : 14 : 15;
printf("%d", a);
What is the output of the following statements?
int b=15, c=5, d=8, e=8, a;
a = b>c ? c>d ? 12 : d>e ? 13 : 14 : 15;
printf("%d", a);
What will be the output of the following program?
void main()
{
int a, b, c, d;
a = 3;
b = 5;
c = a, b;
d = (a, b);
printf("c=%d d=%d", c, d);
}
What will be the output of the following program?
void main()
{
int a, b, c, d;
a = 3;
b = 5;
c = a, b;
d = (a, b);
printf("c=%d d=%d", c, d);
}
Determine output:
void main()
{
int i=10;
i = !i>14;
printf("i=%d", i);
}
Determine output:
void main()
{
int i=10;
i = !i>14;
printf("i=%d", i);
}
In C programming language, which of the following type of operators have the highest precedence
In C programming language, which of the following type of operators have the highest precedence
Determine output:
void main()
{
int i=0, j=1, k=2, m;
m = i++ || j++ || k++;
printf("%d %d %d %d", m, i, j, k);
}
Determine output:
void main()
{
int i=0, j=1, k=2, m;
m = i++ || j++ || k++;
printf("%d %d %d %d", m, i, j, k);
}
Choose the correct output for the following program.
#include<stdio.h>
void main()
{
int a=10, b=11, c=13, d;
d = (a=c, b+=a, c=a+b+c);
printf("%d %d %d %d", d, a, b, c);
}
Choose the correct output for the following program.
#include<stdio.h>
void main()
{
int a=10, b=11, c=13, d;
d = (a=c, b+=a, c=a+b+c);
printf("%d %d %d %d", d, a, b, c);
}
-
-
-
-
-
Find the output of the following program.
#include
void main()
{
int y=10;
if(y++>9 && y++!=10 && y++>11)
printf("%d", y);
else
printf("%d", y);
}
Find the output of the following program.
#include
void main()
{
int y=10;
if(y++>9 && y++!=10 && y++>11)
printf("%d", y);
else
printf("%d", y);
}