10?"Ps\n":"%s\n", str); return 0; } C-program Ps Error None of above"> 10?"Ps\n":"%s\n", str); return 0; } C-program Ps Error None of above">
#include<stdio.h> int main() { char str[]="C-program"; int a = 5; printf(a >10?"Ps\n":"%s\n", str); return 0; }
if(a > 10)
{
printf("Ps\n");
}
else
{
printf("%s\n", str);
}
Here we are checking a > 10 means 5 > 10. Hence this condition will be failed. So it prints variable str.
Hence the output is "C-program".
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.