[ create a new paste ] login | about

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

C, pasted on Mar 15:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#include<stdio.h>
int main()
{
char str1[]="hello";
char str2[20];
fun1(str1,str2);
printf("%s",str2);
char fuun1(*str1,*str2);
while(str1[i]!='\0'){
str2[i]=str1[i];
i++;
}
str2[i]='/0';
return str2;


Output:
1
2
3
4
5
6
7
8
9
10
In function 'main':
Line 8: error: expected declaration specifiers or '...' before '*' token
Line 8: error: expected declaration specifiers or '...' before '*' token
Line 9: error: 'i' undeclared (first use in this function)
Line 9: error: (Each undeclared identifier is reported only once
Line 9: error: for each function it appears in.)
Line 8: warning: multi-character character constant
Line 14: warning: return makes integer from pointer without a cast
Line 14: warning: function returns address of local variable
Line 14: error: expected declaration or statement at end of input


Create a new paste based on this one


Comments: