-5

I'm new to Linux and C and when trying to run a basic "Hello World" script, i kept getting the same two errors. I have confirmed that everything in the program is correct. errors gotten when trying to compile code

2 Answers2

0

You are running the gcc command from the home directory (~) when the hello.c file is in ~/Documents.

Either navigate to Documents using cd before running gcc or place hello.c in the home directory.

J...S
  • 5,079
  • 1
  • 20
  • 35
0

Go to the folder at which your file is existing, and then save the program.

foldername>~$ gcc filename.c

Vivek Singh
  • 114
  • 1
  • 8