Creating and Compiling a C program under linux?
1.In shell /terminal open vi editor for writing a c program source code for that
user@ubuntu:~$ vi hello.c press enter
2. now vi editor is opened then press I button in your key board to enter in to insert mode of vi editor
write your C code after writing your C code
press Esc button
for save and exit from vi editor press :wq from key board
3.now your source code is ready to be complie
4.use cc hello.c for complling the source code to get executable code
user@ubuntu:~$ cc hello.c press enter
6.use ./a.out for run the executable file
user@ubuntu:~$ ./a.out press enter
link
---------------------
No comments:
Post a Comment