#include<iostream>
#include<string.h>
using namespace std;
int main()
{
char one[]="one";
char two[]="two";
if(one==two){
cout<<"Equal";
}
if(strcmp(one, two)==0){
cout<<"Equal";
}
else
{
cout<<"NotEqual";
}
return 0;
}
What will be the output of the C program?
#include<stdio.h>
int main()
{
int i = 5, j = 6, k = 7;
if(i > j == k)
printf("%d %d %d", i++, ++j, --k);
else
printf("%d %d %d", i, j, k);
return 0;
}
What will be the output of the C program?
#include<stdio.h>
int main()
{
int i = 2;
if(i == (1, 2))
printf("Hai");
else
printf("No Hai");
return 0;
}
What will be the output of the C program?
#include<stdio.h>
int main(){
char str[8] = "2braces";
char str1[8] = "2braces";
if(str == str1)
printf("Strings are Equal");
else
printf("Not Equal");
return 0;
}
What will be the output of the C program?
#include<stdio.h>
int main(){
int i = 5;
if(i == 3, 4)
printf("Hai");
else
printf("No Hai");
return 0;
}
What will be the output of the C program?
#include<stdio.h>
int main(){
char *str = {"2braces"};
char *str1 = {"2braces"};
if(*str == *str1)
printf("inside if block");
else
printf("inside else block");
return 0;
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z = (y++) ? y == 1 && x : 0;
printf("%d\n", z);
return 0;
}
What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 1;
int y = x == 1 ? getchar(): 2;
printf("%d\n", y);
}
Which keyword can be used for coming out of recursion?
break
SHOW ANSWERWhat is the output of this C code?
int main()
{
int a = 0, i = 0, b;
for (i = 0;i < 5; i++)
{
a++;
continue;
}
}
What is the output of this C code?
int main()
{
int a = 0, i = 0, b;
for (i = 0;i < 5; i++)
{
a++;
if (i == 3)
break;
}
}
The keyword ‘break’ cannot be simply used within:
Which keyword is used to come out of a loop only for that iteration?