ExamVeda
Login
Home
This question belongs to C Program C Miscellaneous
C Miscellaneous
?

Determine Output:
void main()
{
      int i;
      char a[]="�"; 
      if(printf("%sn", a))
            printf("Ok here n");
      else
            printf("Forget itn");
}

Answer & Solution
Correct Answer: Option A

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.

Examveda
Question posted by Examveda
Community

Join the Discussion

1 Comment
Vishal Garg
Vishal Garg 10 years ago
This is Correct Answer: �nOk here n

Please Correct!