How the C program can be compiled?

Answer Posted / kanimozhi91

Linux/Unix
* Pre-requisite : Before compiling check if gcc package is installed, if not install it either by using apt-get install/yum install based on the Linux kernel.
* Once installed, save the program as hello.c
* Compile it using gcc hello.c which will produce object file a.out
* Finally run it as ./a.out

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are qualifiers?

621


Can you subtract pointers from each other? Why would you?

570


Why is structure important for a child?

610


What is indirection? How many levels of pointers can you have?

672


How can you increase the allowable number of simultaneously open files?

605






how we can make 3d venturing graphics on outer interface

4025


#include main() { int *p, *c, i; i = 5; p = (int*) (malloc(sizeof(i))); printf(" %d",*p); *p = 10; printf(" %d %d",i,*p); c = (int*) calloc(2); printf(" %d ",*c); }

638


How is actual parameter different from the formal parameter?

600


Is c# a good language?

616


Why we write conio h in c?

577


What is the use of header?

632


What is struct node in c?

631


What are the 5 elements of structure?

577


Why & is used in scanf in c?

634


What is the use of c language in real life?

540