+ 5
Check out the code below and please do explain me about why im getting output for this code as 'is This'.
int main() { cout << "This " +2<< "awesome!"-6; return 0; }
2 Answers
+ 3
nice one.
just played around. it seems that the String is seen as Pointer and with the numbers you refer to the Pointer place.
this means if you write like +2 you start from the beginning +2 which explains the "is" and the -7 rewind your Pointer place to "This".
i didn't know that this is possible, maybe it is not possible with every compiler. nevertheless curious if one can use it as an exploit :)
[edit] no, you can not use it as exploit ;)
0
Nice