assignment 1,, any one have terminal commands to run c compiler, how to compile & write c program
2 posters
Page 1 of 1
assignment 1,, any one have terminal commands to run c compiler, how to compile & write c program
any one have terminal commands to run c compiler, how to compile & write c program
BCS-FAO7-22/LHR- Posts : 2
Join date : 2009-09-03
execute code
for example Your code file simple.c is locate on desktop
the way to run it
1 : open terminal
2 : type ls
3 : the directory list will
4 : type cd Desktop(Must be same as list)
5 : for compling file use gcc compiler the way is type gcc filemane or gcc -o objectfilename.out file name
for 1 examlpe gcc simple.c or
2 gcc -o simplebinary.out simple.c
6 : this will create a binary file in which directory you are currently you in desktop in first example file is a.out and in 2 that name you will give like simplebinary.out
7 : run type ./a.out for 1 example ./simplebinary.out for second
key point :
cd Desktop
gcc simple.c
./a.out
the way to run it
1 : open terminal
2 : type ls
3 : the directory list will
4 : type cd Desktop(Must be same as list)
5 : for compling file use gcc compiler the way is type gcc filemane or gcc -o objectfilename.out file name
for 1 examlpe gcc simple.c or
2 gcc -o simplebinary.out simple.c
6 : this will create a binary file in which directory you are currently you in desktop in first example file is a.out and in 2 that name you will give like simplebinary.out
7 : run type ./a.out for 1 example ./simplebinary.out for second
key point :
cd Desktop
gcc simple.c
./a.out
bcsf7-007- Posts : 2
Join date : 2009-09-06
Similar topics
» Hello Everyone
» Short Forum Assignment
» Assignment 1 Discussion!
» ASSIGNMENT 01
» Sir Please tell about Assignment cofusion
» Short Forum Assignment
» Assignment 1 Discussion!
» ASSIGNMENT 01
» Sir Please tell about Assignment cofusion
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum