Home > Backend Development > C++ > body text

What is the True Type of a String Literal in C ?

Susan Sarandon
Release: 2024-10-27 21:24:30
Original
213 people have browsed it

 What is the True Type of a String Literal in C  ?

Determining the Type of a String Literal

Many programmers grapple with understanding the type of a string literal. Is it a const char * (pointer to a constant character) or a const char (constant character)?

The answer lies in the representation of string literals in C . Unlike in C, where string literals are stored as arrays of characters with a null-terminator ('

The above is the detailed content of What is the True Type of a String Literal 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!