UrbanPro
true

Learn Embedded Systems from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Search in

Compiling a C program on Linux machine GCC

N
Narasimha Reddy
08/03/2020 0 0

Note: if GCC is not available in your Ubuntu Linux machine install by using below command

$sudo apt-get install gcc-4.9

Here 4.9 is GCC version

Similarly for installing vim

$ sudo apt-get install vim

 

Below are the steps we have to follow for compiling a c programming file on Linux(Ubuntu):

1) create a .c file using the below command

$vim demo_prog.c

2) write some logic based on your requirement and save using by pressing escape key and type " :wq "

3) compile the demo_prog.c using GCC

$gcc demo_prog.c

4) if no syntax errors in your demo_prog.c file then GCC compiler creates a.out file.

5) run a.out file

$./a.out

 

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You

Embedded Systems - PIC Microcontroller
MCLR: First pin of PIC 18F4520 MCLR - Master Clear (It is an active low pin) MCLRE - Master Clear Enable MCLRE = ON (It means Enable the reset function) MCLRE = OFF (It means Disable the reset function) TRIS...

C language
#include #include void main() { clrscr(); printf("\n Urban Pro "); getch(); } Answer the output in c programming: Output: UrbanPro

There is no language called Embedded C
Many students may get surprised to know that there is no language called "embedded C", and there is only one i.e. "C". As every one knows that C is a computer language tool to develop applications. ...

Be prepared to get trained--init
Before starting the training,students must be mentally prepared for acceptance of new knowledge. Students must attend training with open minded forgetting the position they are working.This will help...
S

Smartnub Softsolutions

0 0
0

Magic in C=> OFFSET OF MACRO in C [offsetof(TYPE, MEMBER)]
Here I am going to discuss an exciting macro in C. It will give you offset of a member within a structure. NULL or 0 address is typecasted to TYPE first. It won't result in segmentation fault as we are...
X

Looking for Embedded Systems Classes?

The best tutors for Embedded Systems Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Learn Embedded Systems with the Best Tutors

The best Tutors for Embedded Systems Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more