[ create a new paste ] login | about

Link: http://codepad.org/S77HSfWZ    [ raw code | output | fork ]

C++, pasted on Mar 27:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;

void fun(char* p, char * temp)
{
	while (*temp)
		*p++=*temp++;
}
int main()
{
	char * t = (char *)"0123456789";
        char * temp = (char *)"String with length more than 10 symbols";
	fun(t, temp);
	cout << t << endl;
	cin.get();
	return 0;
}


Output:
1
Segmentation fault


Create a new paste based on this one


Comments: