1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
#include <iostream> using namespace std; void fun(char* p) { char * temp= (char *)"String with length more than 10 symbols"; while (*temp) *p++=*temp++; } int main() { char * t = (char *)"0123456789"; fun(t); cout << t << endl; return 0; }
1
Segmentation fault