Dark Horse Programmer---iOS learning log 4

Source: Internet
Author: User

------<a href= "http://www.itheima.com" target= "blank" >java training, Android training, iOS training,. NET training </a>, look forward to communicating with you! -------

The concept of C language identifier and its naming principle

1. Identifiers

In c language, symbolic constants, arrays, functions, etc. all need a certain name, we call this name identifier.

Notation Partitioning: Keywords, predefined identifiers, and user identifiers

2. Naming principles for identifiers

One, can only consist of letters, numbers, underscores, or dollar signs ($)

Second, cannot start with a number

Third, can not duplicate the name of the keyword

Four, strictly case-sensitive

Example:

#include <stdio.h>

int main (Intargc,const char*argv[]) {

INT ABC; ABC is a symbol

int _ADC//_abc is also a notation

return 0;

}

Naming conventions for identifiers

1. Make a meaningful name (can improve the readability of the code)

2. Hump naming method (that is, when a variable name or function name is connected together by one or more words, the first word starts with a lowercase letter, the first letter of the second word is capitalized, or the first letter of each word is capitalized)

For example: MyFirstName or MyFirstName

Data types in C language

Dark Horse Programmer---iOS learning log 4

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.