What will be the output of below C program?
#include <stdio.h>
int main()
{
float f1 = 0.1;
if (f1 == 0.1)
printf("Equal\n");
else
printf("Not equal\n");
}
What will be the output of below C program?
#include <stdio.h>
int main()
{
int i = 0, j = 0;
if (i && (j = i + 10)){}
printf("%d",j);
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int i = 1;
if (i++ && (i == 1))
printf("Yes\n");
else
printf("No\n");
}
What will be the output of this C program?
#include <stdio.h>
int main()
{
int a = 10;
if (a == a--)
printf("TRUE 1\t");
a = 10;
if (a == --a)
printf("TRUE 2\t");
}
What is the output of this C code?
#include <stdio.h>
int main()
{
unsigned int i = 23;
signed char c = -23;
if (i > c)
printf("Yes\n");
else if (i < c)
printf("No\n");
}
What is the output of this C code?
#include <stdio.h>
int main()
{
1 < 2 ? return 1: return 2;
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 1;
int y = x == 1 ? getchar(): 2;
printf("%d\n", y);
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 1;
short int i = 2;
float f = 3;
if (sizeof((x == 2) ? f : i) == sizeof(float))
printf("float\n");
else if (sizeof((x == 2) ? f : i) == sizeof(short int))
printf("short int\n");
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int k = 8;
int m = 7;
int z = k < m ? k++ : m++;
printf("%d", z);
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = (y++) ? 2 : y == 1 && x;
printf("%d\n", z);
return 0;
}
The output of the C code below is:-
#include <stdio.h>
int main()
{
int x = 5;
if (x < 1)
printf("hello");
if (x == 5)
printf("hi");
else
printf("no");
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int x = 0;
if (x == 0)
printf("hi");
else
printf("how are u");
printf("hello");
}
What will be the output of the C code below when 1 is entered as input?
#include <stdio.h>
int main()
{
double ch;
printf("enter a value btw 1 to 2:");
scanf("%lf", &ch);
switch (ch)
{
case 1:
printf("1");
break;
case 2:
printf("2");
break;
}
}
What will be the output of the C code below when 2 is entered as input?
#include <stdio.h>
int main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch)
{
case 1:
printf("1\n");
break;
printf("Hi");
default:
printf("2\n");
}
}
What will be the output of the C code below when 1 is entered as input?
#include <stdio.h>
int main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch, ch + 1)
{
case 1:
printf("1\n");
break;
case 2:
printf("2");
break;
}
}
What is the output of this C code when 3 is entered?
#include <stdio.h>
int main()
{
int ch;
printf("enter a value btw 1 to 2:");
scanf("%d", &ch);
switch (ch,ch+1)
{
case 1:
printf("1\n");
break;
printf("hi");
default:
printf("2\n");
}
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int a = 1, b = 1;
switch (a)
{
case a*b:
printf("yes ");
case a-b:
printf("no\n");
break;
}
}
What will be the output of below C program?
#include <stdio.h>
int main()
{
int x = 97;
switch (x)
{
case 'a':
printf("yes ");
break;
case 97:
printf("no\n");
break;
}
}
What is the output of this C code?
#include <stdio.h>
int main()
{
float f = 1;
switch (f)
{
case 1.0:
printf("yes\n");
break;
default:
printf("default\n");
}
}
What is the output of this C code?
#include <stdio.h>
int main()
{
int i = 0;
for (i = 0;i < 5; i++)
if (i < 4)
{
printf("Hello");
break;
}
}
The output of the C code below is
#include <stdio.h>
int main()
{
int i = 0;
if (i == 0)
{
goto label;
}
label: printf("Hello");
}
What will be the output of below C program?
#include <stdio.h>
int main()
{
int i = 0, k;
label: printf("%d", i);
if (i == 0)
goto label;
}