1. Bug: \n
error:expected
‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘{’ token
2. Bug: don’t know
error: stray ‘\’
in program
printf("hello
panda"\n);
3. Bug: don’t know
error: expected ‘=’,
‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘{’
token
{
4. Bug: int main ()
error: ‘n’
undeclared (first use in this function)
printf("hello
panda"/n);
5. Bug : asm()
error: expected
string literal before ‘)’ token
asm()
6. Bug: asm(n)
error: expected
string literal before ‘n’
asm(n)
7. Bug: asm(string
a);
error: expected
string literal before ‘string’
asm(string a);
8. Bug: int main;
error: expected
identifier or ‘(’ before ‘{’ token
{
9. Bug: in main()
error: unknown
type name ‘in’; did you mean ‘int’?
in main()
^~
int
hello.c: In function
‘main’:
hello.c:5:23: error:
‘n’ undeclared (first use in this function)
printf("hello
panda"/n);
^
10. Bug : from 1 to
9 “hello panda”\n
correct:
(“hello panda \n “);
11. Bug : return
warning:
‘return’ with no value, in function returning non-void
return ;
^~~~~~
hello.c:3:5: note:
declared here
int main()
12. Bug: <stdio.h
error: missing
terminating > character
#include<stdio.h
^
13. Bug:
inclue<stdio.h>
error: invalid
preprocessing directive #inclue; did you mean #include?
#inclue<stdio.h>
^~~~~~
include
hello.c: In function
‘main’:
hello.c:5:2:
warning: implicit declaration of function ‘printf’
[-Wimplicit-function-declaration]
printf("hello
panda /n");
^~~~~~
hello.c:5:2:
warning: incompatible implicit declaration of built-in function
‘printf’
hello.c:5:2: note:
include ‘<stdio.h>’ or provide a declaration of ‘printf’
14. Bug: int man ()
/usr/lib/gcc/x86_64-redhat-linux/7/../../../../lib64/crt1.o: In
function `_start':
(.text+0x20):
undefined reference to `main'
collect2: error: ld
returned 1 exit status
15. Bug: ‘{‘ not
mentioned after int main()
hello.c:5:2: error:
expected declaration specifiers before ‘printf’
printf("hello
panda /n");
^~~~~~
hello.c:6:2: error:
expected declaration specifiers before ‘return’
return 0 ;
^~~~~~
hello.c:8:1: error:
expected declaration specifiers before ‘}’ token
}
^
hello.c:8:1: error:
expected ‘{’ at end of input
16. Bug: remove #
error: expected
‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before
‘<’ token
include<stdio.h>
It looks like you're new here. If you want to get involved, click one of these buttons!