[ create a new paste ] login | about

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

C, pasted on Jul 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include <stdio.h>
void sum(int *p1,int *p2,int *p3 int);
int main()
{
	int arry1[3]={1,2,3};
	int arry2[3]={2,3,4};
	int arry3[3]={0};
	sum(arry1,arry2,arry3,3);
	return(0);
}

void sum(int *p1,int *p2,int *p3,int row){
	int i,row=1;
	for(i=0;i<row;i++){
		*p3=*p1+*p2;
		printf("%d ",*p3);
	}
}


Output:
1
2
3
4
5
6
Line 2: error: expected ';', ',' or ')' before 'int'
Line 12: warning: conflicting types for 'sum'
Line 8: warning: previous implicit declaration of 'sum' was here
In function 'sum':
Line 13: error: 'row' redeclared as different kind of symbol
Line 12: error: previous definition of 'row' was here


Create a new paste based on this one


Comments: