Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the grammatical units in C language

2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

I believe many inexperienced people don't know what to do about the grammar units in C language. therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.

1. Basic symbol

According to C99, the basic symbol set of C language includes:

(1) 26 capital letters

(2) 26 lowercase letters

(3) 10 numeric characters

(4) 29 graphic characters:! "#% &'() * +, -. /:

< = >

? [\] "_ {|}"

It is worth noting that the above symbols are half-width symbols, not full-width symbols, coding should pay attention to the current state of the input method.

two。 Keyword

Keywords are words or word abbreviations retained by the programming language and given specific grammatical meaning, which are used to explain a certain grammatical concept of a fixed meaning. (similar to gerunds and nouns with specific meanings in natural language)

Among the 37 keywords in C99, the commonly used ones are:

Relating to the data type:

Char int float double signed unsigned

Short long void struct union typedef

Enum sizeof

Related to the type of storage:

Auto extern register static

Relating to the structure of program control:

Do while for if else switch case

Default goto continue break return

3. Identifier

The so-called identifier is a valid character sequence used to identify variable names, symbolic constant names, function names, type names, file names, and so on. (similar to the names of various things in natural language)

The C language stipulates that identifiers can only be composed of letters, numbers and underscores, and the first character must be a letter or an underscore.

For example:

Legal identifier: _ 22A mentions leaqian 1 recorder avg3 dyadic ABCde43xyw8

Illegal identifier: M.J. YORKLING 238QI XYJOBLING 8Tea

Note: in C language, uppercase and lowercase letters are not equivalent. Therefore, an and AMagi and iMagol Sum and sum are two different identifiers, respectively.

After reading the above, have you mastered the methods of grammatical units in C language? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report