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 three-character groups in C language?

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

Share

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

This article mainly explains "what are the three-character groups of C language". The content of the explanation is simple and clear, and it is easy to learn and understand. Let's follow the editor's train of thought to study and learn "what are the three-character groups of C language"?

Witness a "miracle"

# include # include int main (void) {int a = (int) sqrt (30); / / is sqrt (30) + 1 > 5? / / you don't care why you deliberately let it happen; if (a > 5) printf ("sqrt (30) + 1 > 5\ n"); else {printf ("sqrt (30) + 15\ afie +)

As we all know,\ exists (usually a line of code is too long and can be wrapped by the symbol), so that the above looks like two lines, but it is actually one line. That is to say:

/ / is sqrt (30) + 1 > 5 asides +

In other words, averse + will not be implemented at all, which will, of course, cause the final result to fall short of expectations.

Of course, many modern compilers may not do such a replacement, so there is basically no need to worry about this problem, just use the original symbols.

In fact, the careful reader may have observed that I added the compilation option-trigraphs to the previous example code, otherwise, compilation is a warning:

$gcc-o main main.c main.c: In function 'main': main.c:6:27: warning: trigraph? / ignored, use-trigraphs to enable [- Wtrigraphs] / / is sqrt (30) + 1 > 5? /

Double character group

In addition to the three-character group, there is also a two-character group.

Thank you for your reading. the above is the content of "what are the three-character groups of C language". After the study of this article, I believe you have a deeper understanding of what the three-character groups of C language have. The specific use of the situation also needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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

Development

Wechat

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

12
Report