void main()
{
int i;
char a[]="\0";
if(printf("%s\n",a))
printf("Ok here \n");
else
printf("Forget it\n");
}
Answer:
Ok here
Explanation:
Printf will return how many
characters does it print. Hence printing a null character returns 1 which makes
the if statement true, thus "Ok here" is printed.
Blog Author: Vijay Kumar
Go to: Java Aptitude, C C++ Aptitude
No comments:
Post a Comment