Short Answer: 100q
Explaination:
1. Pointer 'p' points to address of s[4] = *(s+4) = *(4+s) = 4[s] {This relation between arrays and pointer is important}.
2. Pointer 'q' points to r[2].
3. Pointer str1 points to r[0]
4. Pointer str2 points to s[0]
So now we evaluate simply:
1. ++*p = ++(s[4]) = ++('c') = 'd' = 100.
2. ++*str1++ = ++(r[0])++ = ++('G')++ =' H'++ [ ASCII numerical value of 'H' will be taken in this step because pre-increment operator is used which first assigns the values and then increments ] = 72. Notice that after this step, 'H' would be turned to 'I' for next printf calculation.
3. ++*str2++ = 104 [and the array value changes to 'i' after assignment].
So, 100 - 72 + 104 -32 = 100. Since format specifier is %d, hence 100 will be printed.
4. For next printf, new array values are:
s[ ] = { 'i', 'a', 't', 'e', 'd', 's' }
r[ ] = { 'I', 'A', 'T', 'E', 'C', 'S' }
Now as mentioned earlier; 3[s] = *(3+s) = *(s+3) = s[3]. So applying the concepts, we get 113 after calculation. This for the case of %c results in q.
Since there is no newline charactor, output will be 100q