Get the App
SLTechnology News&Howtos  ›  Development  › 

What are the three-character groups in C language?

Shulou Source: shulou.com Published: 2022-06-02 18:31:32 10月03日 Update

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!

Tags: Language three words characters symbols compilation code results questions learning careful one line that is content quotation marks reader input run special list one by one Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB Linux MySQL Shulou Tech Info