Point out the error in the following program.
#include<stdio.h>
int main()
{
void v = 0;
printf("%d", v);
return 0;
}
What is the output of the program
union a
int i;
char ch[2];
};
union a u;
u.ch[0] = 3;
u.ch[1] = 2;
printf("%d, %d, %d\n", u.ch[0], u.ch[1], u.i);
Point out the error, if any in the program.
int j = 100;
switch(j)
case 10:
printf("Case 1");
case 20:
printf("Case 2");
break;
case j:
printf("Case j");
What will be the output of the program?
int X=40;
int X=20;
printf("%d ", X);
printf("%d\n", X);
Point out the error, if any in the while loop.
int i=0;
while()
printf("%d\n", i++);
if(i>10)
int i=-3, j=2, k=0, m;
m = ++i || ++j && ++k;
printf("%d, %d, %d, %d\n", i, j, k, m);
The way the break is used to take control out of switch can continue to take control of the beginning of the switch?
The program is used to check whether the given year is leap or not
void main()
int y;
scanf("%d",&y); // input given is 2000
if( (y%4==0 && y%100 != 0) || y%100 == 0 )
printf("%d is a leap year");
else
printf("%d is not a leap year");
Which of the following are unary operators in C?
int i=5;
printf("%d%d%d%d%d%d",i++,i--,++i,--i,i);
How many times "Sree Jobs" is get printed?
int x;
for(x=-1; x<=10; x++)
if(x < 5)
continue;
printf("Sree Jobs");