[ create a new paste ] login | about

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

C, pasted on Jun 16:
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

char *strdup(char *);

int main()
{
	char x[] = "dump", *a;

	a = strdup(x);
	return 0;
}

char *strdup(char *s)
{
	char *np;

	np = (char *) malloc(strlen(s) + 1);
	strcpy(np, s);
	return np;
}


Output:
1
2
Line 5: error: expected identifier or '(' before '__extension__'
Line 15: error: expected identifier or '(' before '__extension__'


Create a new paste based on this one


Comments: