Predict the output:
int main()
{
printf(5+"sharksrini");
return 0;
}
Output:
srini
Logic:
consider a string operation.
char a[]="sharksrini";
a+1 will specifies address in which 'h' is stored .if we print a+1 ,it will print "harksrini"
a+2 will specifies address in which 'a' is stored. if we print a+2,it will print "arksrini"
likewise
a+5 will print "srini"
In this program 5+"sharksrin" will print "srini" in the same procedure above specified