Run your first code under Linux--hello Linux

Source: Internet
Author: User

Overview:

Recently contact with Linux, but also in the recognition of "bird Brother's Linux private dishes." Yes, it's really a good story. Now see the 10th Chapter Vim Program Editor. Although brother Bird doesn't recommend that we jump to read his article, I skipped one or two chapters without reading it. Don't get me wrong, I'm not Daniel. In fact, know that Vim is not learned in this chapter to understand. I knew it before and I used it. But to write C code in Vim is just the idea. So, I did an experiment.


Practice steps:1. Create a C file


2. Write the C program for Hello Linux

Save Exit Vim


3. Manually compile your C program

Because Vim is just a plain text editor and does not have the ability to compile code, you only have to compile it manually. The compilation process is as follows:

Once the compilation is complete, you can see the following hello* file:



4. Running the program


Note: it must be like./hello to write this, if you think hello this file is already in the current directory, you can directly use Hello to do not.

It's OK to be here. Actually very simple thing, just want to practice, see what you think is not the same. Daniel do not spray ~

Run your first code under Linux--hello Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.