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

Explain bitwise shift operators?

632


Why is extern used in c?

612


Here is a good puzzle: how do you write a program which produces its own source code as output?

599


7-Given an index k, return the kth row of the Pascal's triangle. For example, when k = 3, the row is [1,3,3,1]. For reference look at the following standard pascal’s triangle.

2222


regarding pointers concept

1575






Can a pointer be static?

625


What is a char c?

593


What does it mean when a pointer is used in an if statement?

602


Tell us bitwise shift operators?

599


What is 1d array in c?

602


What is static memory allocation? Explain

632


What is a spanning Tree?

955


What is c language and why we use it?

624


How to declare pointer variables?

686


How do we print only part of a string in c?

587