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 how can you be sure that a program follows the ansi c standard?

1144


A SIMPLE PROGRAM OF GRAPHICS AND THEIR OUTPUT I WANT SEE WAHAT OUTOUT OF GRAPHICS PROGRAM

1914


Create a simple code fragment that will swap the values of two variables num1 and num2.

1043


Is python a c language?

777


What are the preprocessor categories?

828


What is the use of void pointer and null pointer in c language?

852


Find duplicates in a file containing 6 digit number (like uid) in O (n) time.

2962


What does the characters “r” and “w” mean when writing programs that will make use of files?

1181


why wipro wase

2047


Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant

910


What are two dimensional arrays alternatively called as?

943


How do you define structure?

795


I came across some code that puts a (void) cast before each call to printf. Why?

963


Explain the meaning of keyword 'extern' in a function declaration.

926


How can you access memory located at a certain address?

866