Home  >  Article  >  Backend Development  >  Why does \"456\" 1 output \"56\" in C ?

Why does \"456\" 1 output \"56\" in C ?

Mary-Kate Olsen
Mary-Kate OlsenOriginal
2024-11-01 08:01:02399browse

Why does

Understanding the Output of "456" 1

In C code, the expression "456" 1 may seem confusing when it outputs "56" instead of "457." To understand this behavior, we must dive into the intricacies of the code.

In C , strings are stored as character arrays, and the literal "456" is equivalent to the array {'4', '5', '6', '

The above is the detailed content of Why does \"456\" 1 output \"56\" in C ?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn