0
What is the output of this code?
int i=0; printf("%d"+1,i); explain it plsss
7 Answers
0
01
***I believe. going from java....
the %d is the parameter, that you put in. so it will first substitute that value there then the + 1, concatenates a 1 to whatever it was.
so if you got
string x = "the";
printf("%s" + 3, x);
you should see
the3
hope im right lol. hope this helps!!
0
i am getting the output as d but why
0
d is a placeholder for an integer parameter, I, which will be substituted in at runtime. if you are getting the character d to print out. your compiler is broken.
0
yeah I got it
printf("hello"+2); outputs llo
printf("godaddy"+2);. outputs daddy
similarly printf("%d"+1,i);. outputs d ..... it's a different concept!!!!
0
it takes off the first two letters of the string????? what?. that means that it wouldn't print anything out. unless it sees the % as a printable character. then you would only get d. but that completely deteriorated the point of the printf function...
0
Yeah , right , I said it is a new concept.....try it in compiler.....
0
oh. I have never used c.............. lol