1. Deleted #
hello.c:1:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
include<stdio.h>
2. Deleted ‘(‘ from main fuction
hello.c:3:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘)’ token
int main){
3. Deleted ‘)’ from main function
hello.c:3:10: error: expected declaration specifiers or ‘...’ before ‘{’ token
int main({
4. Deleted ‘{‘ after main fucntion
hello.c: In function ‘main’:
hello.c:5:2: error: expected declaration specifiers before ‘printf’
printf("Hello! World");
^~~~~~
hello.c:6:2: error: expected declaration specifiers before ‘return’
return 0;
^~~~~~
hello.c:7:1: error: expected declaration specifiers before ‘}’ token
}
^
hello.c:7:1: error: expected ‘{’ at end of input
5. Deleted ‘}’ after end of the input
hello.c: In function ‘main’:
hello.c:6:2: error: expected declaration or statement at end of input
return 0;
^~~~~~
6. Deleted ‘(‘ after printf
hello.c: In function ‘main’:
hello.c:5:8: error: expected ‘;’ before string constant
printf"Hello! World");
^~~~~~~~~~~~~~
hello.c:5:22: error: expected statement before ‘)’ token
printf"Hello! World");
7. Deleted ‘)’ end of printf
hello.c: In function ‘main’:
hello.c:5:23: error: expected ‘)’ before ‘;’ token
printf("Hello! World";
^hello.c:7:1: error: expected ‘;’ before ‘}’ token
}
8. Deleted starting “ in printf
hello.c: In function ‘main’:
hello.c:5:9: error: ‘Hello’ undeclared (first use in this function); did you mean ‘ftello’?
printf(Hello! World");
^~~~~
ftello
hello.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
hello.c:5:14: error: expected ‘)’ before ‘!’ token
printf(Hello! World");
^
hello.c:5:21: warning: missing terminating " character
printf(Hello! World");
^
hello.c:5:21: error: missing terminating " character
printf(Hello! World");
^~~
hello.c:7:1: error: expected ‘;’ before ‘}’ token
}
^
9. Deleted ending “ in printf
hello.c: In function ‘main’:
hello.c:5:9: warning: missing terminating " character
printf("Hello! World);
^
hello.c:5:9: error: missing terminating " character
printf("Hello! World);
^~~~~~~~~~~~~~~
hello.c:6:2: error: expected expression before ‘return’
return 0;
^~~~~~
hello.c:7:1: error: expected ‘;’ before ‘}’ token
}
^
10. Deleted “;” after printf
hello.c: In function ‘main’:
hello.c:6:2: error: expected ‘;’ before ‘return’
return 0;
^~~~~~
11. Deleted “0” after return
hello.c: In function ‘main’:
hello.c:6:2: warning: ‘return’ with no value, in function returning non-void
return ;
^~~~~~
hello.c:3:5: note: declared here
int main(){
^~~~
12. Remove space between command “return 0”
hello.c: In function ‘main’:
hello.c:6:2: error: ‘return0’ undeclared (first use in this function)
return0 ;
^~~~~~~
hello.c:6:2: note: each undeclared identifier is reported only once for each function it appears in
13. Deleted “;” after return 0 command.
hello.c: In function ‘main’:
hello.c:7:1: error: expected ‘;’ before ‘}’ token
}
^
14. Capital the “p” in printf command
hello.c: In function ‘main’:
hello.c:5:2: warning: implicit declaration of function ‘Printf’; did you mean ‘printf’? [-Wimplicit-
function-declaration]
Printf("Hello! World");
^~~~~~
printf
/tmp/cciJzrGh.o: In function `main':
hello.c:(.text+0x11): undefined reference to `Printf'
collect2: error: ld returned 1 exit status
15. Remove data type form main
hello.c:3:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
main(){
^~~~
16. Deleted “<” after #include
hello.c:1:2: error: invalid preprocessing directive #includestdio; did you mean #include?
^~~~~~~~~~~~
include
hello.c: In function ‘main’:
hello.c:5:2: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
printf("Hello! World");
^~~~~~
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’
17. Remove “>” after stdio.h
hello.c:1:17: error: missing terminating > character
#include<stdio.h
^
18. Remove header extention
hello.c:1:9: fatal error: stdio: No such file or directory
#include<stdio>
^~~~~~~
compilation terminated.
19. Remove both double quotes in printf command
hello.c: In function ‘main’:
hello.c:5:9: error: ‘Hello’ undeclared (first use in this function); did you mean ‘ftello’?
printf(Hello! World);
^~~~~
ftello
hello.c:5:9: note: each undeclared identifier is reported only once for each function it appears in
hello.c:5:14: error: expected ‘)’ before ‘!’ token
printf(Hello! World);
20. Remove “include”
hello.c:1:2: error: invalid preprocessing directive #<
#<stdio.h>
^
hello.c: In function ‘main’:
hello.c:5:2: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
printf("Hello! World");
^~~~~~
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’
Error1:Deleted #
hello.c:1:8: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘<’ token
1 | include<stdio.h>
| ^
Error 2: Deleted ( from main
hello.c:4:1: error: expected declaration specifiers or ‘...’ before ‘{’ token
4 | {
Error 3: Deleted ;
hello.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | main()
| ^~~~
hello.c: In function ‘main’:
hello.c:5:15: error: expected ‘;’ before ‘}’ token
5 | printf("123 ")
| ^
| ;
6 |
7 | }
| ~
Error 4:return type not present
hello.c:2:2: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | main()
| ^~~~
Error 5:printf –>prinf
hello.c:2:1: warning: return type defaults to ‘int’ [-Wimplicit-int]
2 | main()
| ^~~~
hello.c: In function ‘main’:
hello.c:5:1: warning: implicit declaration of function ‘prinf’; did you mean ‘printf’? [-Wimplicit-function-declaration]
5 | prinf("123 ");
| ^~~~~
| printf
/usr/bin/ld: /tmp/ccS8bfSD.o: in function `main':
hello.c:(.text+0xf): undefined reference to `prinf'
collect2: error: ld returned 1 exit status
Error 6:printf(123 ")-→removing“ at starting of printf statement
hello.c: In function ‘main’:
hello.c:5:12: warning: missing terminating " character
5 | printf(123 ");
| ^
hello.c:5:12: error: missing terminating " character
5 | printf(123 ");
| ^~~
hello.c:5:11: error: expected ‘)’ before ‘return’
5 | printf(123 ");
| ^
| )
6 | return 0;
| ~~~~~~
hello.c:5:8: warning: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
5 | printf(123 ");
| ^~~
| |
| int
In file included from hello.c:1:
/usr/include/stdio.h:332:43: note: expected ‘const char * restrict’ but argument is of type ‘int’
332 | extern int printf (const char *__restrict __format, ...);
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
hello.c:6:10: error: expected ‘;’ before ‘}’ token
6 | return
| ^
| ;
Error 7:printf(123 ")-→deleted“ at end of printf statement
hello.c: In function ‘main’:
hello.c:5:8: warning: missing terminating " character
5 | printf("123 );
|
hello.c:5:8: error: missing terminating " character
5 | printf("123 );
hello.c:6:1: error: expected expression before ‘return’
hello.c:6:10: error: expected ‘;’ before ‘}’ token
Error 8:Deleted 0 in return
hello.c:6:1: warning: ‘return’ with no value, in function returning non-void
6 | return ;
hello.c:2:5: note: declared here
2 | int main()
Error 9:Deleted } at the end of program
hello.c: In function ‘main’:
hello.c:6:1: error: expected declaration or statement at end of input
6 | return 0 ;
Error 10.Deleted <
hello.c:1:2: error: invalid preprocessing directive #includestdio
1 | #includestdio.h>
hello.c: In function ‘main’:
hello.c:5:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
5 | printf("123" );
hello.c:5:1: warning: incompatible implicit declaration of built-in function ‘printf’
hello.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | #includestdio.h>
Error 11.Deleted >
hello.c:1:17: error: missing terminating > character
1 | #include<stdio.h
| ^
Error 12.Deleted ) in printf
hello.c: In function ‘main’:
hello.c:5:13: error: expected ‘)’ before ‘;’ token
5 | printf("123" ;
| )
hello.c:6:11: error: expected ‘;’ before ‘}’ token
6 | return 0 ;
Error 13.Deleted ( in printf
hello.c: In function ‘main’:
hello.c:5:7: error: expected ‘;’ before string constant
5 | printf"123") ;
| ;
hello.c:5:12: error: expected statement before ‘)’ token
5 | printf"123") ;
Error 14.Deleted ) from main
hello.c:3:1: error: expected declaration specifiers or ‘...’ before ‘{’ token
3 | {
Error 15.Deleted { from main
hello.c: In function ‘main’:
hello.c:5:1: error: expected declaration specifiers before ‘printf’
5 | printf("123") ;
hello.c:6:1: error: expected declaration specifiers before ‘return’
6 | return 0 ;
hello.c:8:1: error: expected declaration specifiers before ‘}’ token
8 | }
| ^
hello.c:8: error: expected ‘{’ at end of input
8 | }
Error 16:Written printf in uppercase
hello.c: In function ‘main’:
hello.c:6:1: error: ‘return0’ undeclared (first use in this function)
6 | return0;
hello.c:6:1: note: each undeclared identifier is reported only once for each function it appears in
Error 17:Deleted . From stdio.h
hello.c:1:9: fatal error: stdioh: No such file or directory
Error 18:Deleted stdio From stdio.h
hello.c:1:9: fatal error: .h: No such file or directory
1 | #include<.h>
compilation terminated.
Error 19:Deleted e from include
hello.c:1:2: error: invalid preprocessing directive #includ; did you mean #include?
1 | #includ<stdio.h>
| include
hello.c: In function ‘main’:
hello.c:5:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration]
5 | printf("123") ;
hello.c:5:1: warning: incompatible implicit declaration of built-in function ‘printf’
hello.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
+++ |+#include <stdio.h>
1 | #includ<stdio.h>
Error 20 :return 0-→return0
hello.c: In function ‘main’:
hello.c:6:1: error: ‘return0’ undeclared (first use in this function)
6 | return0;
hello.c:6:1: note: each undeclared identifier is reported only once for each function it appears in
Correct
Program:-
[priyankagupta@localhost
~]$ ls
Desktop
Downloads Music priyanka Templates
Documents
i Pictures Public Videos
[priyankagupta@localhost
~]$ vim
[priyankagupta@localhost
~]$ gcc hello.c
[priyankagupta@localhost
~]$ ls
a.out
Documents hello.c Music priyanka Templates
Desktop
Downloads i Pictures Public Videos
[priyankagupta@localhost
~]$ ./a.out
Hello
word
[priyankagupta@localhost
~]$
Error
1:- Remove stdioh
(.)
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:1:10:
fatal error: stdioh: No such file or directory
1
| #include <stdioh>
|
^~~~~~~~
compilation
terminated.
[priyankagupta@localhost
~]$
p { margin-bottom: 0.25cm; line-height: 115%; background: transparent }
p { margin-bottom: 0.25cm; line-height: 115%; background: transparent }
Error
2:- Remove curly
braces
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:3:1:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘{’ token
3
| {
|
^
Error
3:- Remove int
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:2:2:
warning: return type defaults to ‘int’ [-Wimplicit-int]
2
| main()
|
^~~~
Error
4:- Remove main
()
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:2:6:
error: expected identifier or ‘(’ before ‘)’ token
2
| int ()
|
Error
5:-
Remove main
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:
In function ‘main’:
hello.c:4:2:
error: expected declaration specifiers before ‘printf’
4
| printf("Hello word\n");
|
^~~~~~
hello.c:5:2:
error: expected declaration specifiers before ‘return’
5
| return 0;
|
^~~~~~
hello.c:9:1:
error: expected declaration specifiers before ‘}’ token
9
| }
|
^
hello.c:9:
error: expected ‘{’ at end of input
9
| }
|
Error
6:-
Remove printf of f
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:
In function ‘main’:
hello.c:4:2:
warning: implicit declaration of function ‘print’; did you mean
‘printf’? [-Wimplicit-function-declaration]
4
| print("Hello word\n");
|
^~~~~
|
printf
/usr/bin/ld:
/tmp/cc2QV7Wn.o: in function `main':
hello.c:(.text+0xf):
undefined reference to `print'
collect2:
error: ld returned 1 exit status
Error
7:-
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:
In function ‘main’:
hello.c:4:9:
error: ‘Hello’ undeclared (first use in this function); did you
mean ‘ftello’?
4
| printf(Hello word\n);
|
^~~~~
|
ftello
hello.c:4:9:
note: each undeclared identifier is reported only once for each
function it appears in
hello.c:4:14:
error: expected ‘)’ before ‘word’
4
| printf(Hello word\n);
|
^~~~~
|
)
hello.c:4:19:
error: stray ‘\’ in program
4
| printf(Hello word\n);
|
^
Error
8:-
Remove printf“Hello
word”)
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:
In function ‘main’:
hello.c:4:8:
error: expected ‘;’ before string constant
4
| printf"Hello word\n");
|
^~~~~~~~~~~~~~
|
;
hello.c:4:22:
error: expected statement before ‘)’ token
4
| printf"Hello word\n");
|
^
Error
9:-
Remove
Colon
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:
In function ‘main’:
hello.c:4:24:
error: expected ‘;’ before ‘return’
4
| printf("Hello word\n")
|
^
|
;
5
| return 0;
Error
10:-
Remove
semicolon
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:
In function ‘main’:
hello.c:4:24:
error: expected ‘;’ before ‘return’
4
| printf("Hello word\n")
|
^
|
;
5
| return 0
|
~~~~~~
Error
11:-
Remove
braces
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:1:9:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘<’ token
1
| include <stdio.h>
|
^
Error
11:-
Remove
braces
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:1:9:
error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or
‘__attribute__’ before ‘<’ token
1
| include <stdio.h>
|
^
Error
12:-
Remove
#
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:1:3:
error: invalid preprocessing directive #<
1
| # <stdio.h>
|
^
hello.c:
In function ‘main’:
hello.c:4:2:
warning: implicit declaration of function ‘printf’
[-Wimplicit-function-declaration]
4
| printf("Hello word\n")
|
^~~~~~
hello.c:4:2:
warning: incompatible implicit declaration of built-in function
‘printf’
hello.c:1:1:
note: include ‘<stdio.h>’ or provide a declaration of
‘printf’
+++
|+#include <stdio.h>
1
| # <stdio.h>
hello.c:4:24:
error: expected ‘;’ before ‘return’
4
| printf("Hello word\n")
|
^
|
;
5
| return 0;
|
~~~~~~
Error
13:-
Remove
semicolon
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:
In function ‘main’:
hello.c:4:24:
error: expected ‘;’ before ‘return’
4
| printf("Hello word\n")
|
^
|
;
5
| return 0;
|
~~~~~~
hello.c:5:2:
error: expected declaration or statement at end of input
5
| return 0;
|
^~~~~~
No
Error
14:-
Remove
return 0;
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
[priyankagupta@localhost
~]$ ls
a.out
Documents hello.c Music priyanka Templates
Desktop
Downloads i Pictures Public Videos
No
Error
15:-(After
removing printf program is compile and also given output why?)
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
[priyankagupta@localhost
~]$ ls
a.out
Documents hello.c Music priyanka Templates
Desktop
Downloads i Pictures Public Videos
No
Error
15:-(After
removing printf program is compile and also given output why?)
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
[priyankagupta@localhost
~]$ ls
a.out
Documents hello.c Music priyanka Templates
Desktop
Downloads i Pictures Public Videos
Error
16:-
Remove
stdio
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:1:9:
fatal error: .h: No such file or directory
1
| #include<.h>
|
^~~~
compilation
terminated.
Error
17:-
Remove
‘ ’
[priyankagupta@localhost
~]$ vim hello.c
[priyankagupta@localhost
~]$ gcc hello.c
hello.c:3:1:
error: expected declaration specifiers or ‘...’ before ‘{’
token
3
| {
|
^
It looks like you're new here. If you want to get involved, click one of these buttons!