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 is c mainly used for?

840


What is the size of enum in c?

860


Explain b+ tree?

842


Can a variable be both static and volatile in c?

821


Was 2000 a leap year?

851


Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)

1061


what does static variable mean?

872


What is the importance of c in your views?

836


How will you find a duplicate number in a array without negating the nos ?

1881


Write a program in c to replace any vowel in a string with z?

910


Implement bit Array in C.

911


Why is c so important?

799


Is array name a pointer?

836


Are the outer parentheses in return statements really optional?

850


What is the benefit of using an enum rather than a #define constant?

961