"Learning Notes" "C language" the first C program

Source: Internet
Author: User

1. Create a new C language program
* Open Xcode

* New File

* Choose c language Program

* Enter program name

* Select the storage path

* After creation is complete

2. You can also use the terminal to create

To create a. c File through Directives


3. Writing code

4. Compiling the Code
* Translate C language code into 0 and 1
* Instruction: Cc-c file name. C
* Note space: cc space-C space file name. C
* The successful compilation will generate a. o target file


5. Connect
* In fact, it is to bring us. O's target file is merged with the system's own library to generate an executable file
* Instruction: CC file name. O


6. Running
./a.out

7. Other Directives
Modify executable file name: CC xxx.o-o filename
Compile together, Link: cc xxx.c
8. The entire program operation process

9. Little Common Sense
On the keyboard when using the PC keyboardwin keyis equal to the Apple keyboard Command Key
Command + space to switch between Chinese and English input methods
The name of the program can be added to a number such as 01, so that when the command can be easier to tap, such as: CC 01 can press the TAB key to display the file name

"Learning Notes" "C language" the first C program

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.