Home > Backend Development > C++ > body text

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

Mary-Kate Olsen
Release: 2024-11-01 08:01:02
Original
398 people have browsed it

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!