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

Is that possible to add pointers to each other?

883


Linked lists -- can you tell me how to check whether a linked list is circular?

631


What is the use of the function in c?

588


Give me the code of in-order recursive and non-recursive.

871


What is the significance of scope resolution operator?

845






What functions are in conio h?

643


What is meant by inheritance?

620


Why isn't any of this standardized in c? Any real program has to do some of these things.

615


What is a shell structure examples?

580


What are runtime error?

614


Why doesnt the call scanf work?

652


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

614


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

617


Why does everyone say not to use scanf? What should I use instead?

674


What is header file in c?

593