+ 2
What it the output of this code and why?
char* a = "test"; cout << *(a+5);
2 ответов
+ 3
It should throw an error, for three reasons:
1. You defined it as a char, and then made it a string.
2. You can't add a string and an integer
3. You make the pointer point to (a+5) where it should just be a
So, I'm not sure that it'll work at it's current state.
+ 2
i saw this on an challenge :/