Q:

C program Strings Example how come the result is 98?

C program Strings Example how come the result is 98?
 #include <stdio.h>
int main() 
 {
  char s[]="%d%d%d";
   int a=9,b=8,c=5;
     printf(s+2,a,b,c);
    return 0;
     }

A:

string + x is an operation called Pointer Arithmetic.
That way you are providing reference to a mathematically calculated memory area and by semantics it is equivalent to &string[x]
What actually happens behind the calculation:
(&string + (x * sizeof(*string))) which is why it is a very specific notion when it is applied to pointers. That stands for Arrays as well as they decay to a pointer to the first element after all.

As for your code, you have the following string:
char s[]="%d%d%d";

And is passed as the format string for printf, two bytes afterwards, which explicitly provides reference to "%d%d"

Therefore this:
printf(s+2,a,b,c);

Is later parsed as:
printf("%d%d",a,b,c);

printf will except two integers to read from and the 3rd one will be simply - ignored.

