char a[6] = "WORLD" which be stored like this
Key of this question : there is semicolon (;) after the for loop , so printf statement will only execute when control will come out of the loop or loop condition will be false.
Iteration 1 : i=0,j=5; 0<5 (condition is true ) ;
a[0++] = j[5--]
( here , R.H.S will execute first and j[5--](=null) will be assigned to a[0++] .and then j=5 will be decremented once, bcz post decrement here , same with a[0++] . i will be incremented by one after this statement . )
iteration 2: i=1,j=4 ; 1<4 ( condition is true )
a[1++] = j[4--]
iteration 3 : i=2,j=3; 2<3 (condition is true)
a[2++]=j[3--]
iteration 4 : i=3,j=2; 3<2 (condition false )
so control will go to the printf statement , and the command inside printf statement is saying print the string present on this address of a (base address of array) upto null.
but , here first string is null at a[0] . so control will not move further and the output will be null .
so option b is the correct answer.