1,183 views
1 votes
1 votes
main()

{

Char str[]="%d%s",arr[]="GatesQuiz";

printf(str,0[arr],2[arr+3]);

}

a)GQ

b)71 81

c)71 Q

d) compile time error

1 Answer

1 votes
1 votes
answer is C.

The printf statement will be printf("%d%s",0[arr],2[arr+3]);

0[arr] means *(arr+0) and here it is expecting number bcz of %d so answer is 71 (since ASCII value of A is 65)

2[arr+3] means *(arr+5) and here it is expecting character so Q printed.

No related questions found