0
Code problems
It must output whole your input but it doesn't for strange reason(which i don't know) #include <iostream> int main() { char text, *arr = &text; int i = 0; while(std::cin >> text){ arr[i] = text; std::cout << arr[i]; i++; } return 0; } //input ggg //outputs g%g
3 Answers
+ 4
There is no array in your program. When you do array[i] with i > 0 you corrupt a stack of your main function.
0
So after i corrupted my stack it does ok, why so?
0
Your corruption was big enough to change output, but not enough to break program. Try a long input string with different characters.