[ create a new paste ] login | about

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

C, pasted on Jul 31:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <stdio.h>

struct data{
	char array[20];
};

void print(struct data d){
	printf("%s", d.array);
}

int main(){
	struct data d;

	sprintf(d.array, "hello world");

	print(d);

	return 0;
}


Output:
1
hello world


Create a new paste based on this one


Comments: