answersLogoWhite

0

Some strings are constants, others aren't; some constants are strings, other aren't. So these are unrelated things. Examples:

"text" -- constant string

123 -- constant number

char s[40] -- variable string

User Avatar

Wiki User

12y ago

Still curious? Ask our experts.

Chat with our AI personalities

CoachCoach
Success isn't just about winning—it's about vision, patience, and playing the long game.
Chat with Coach
ViviVivi
Your ride-or-die bestie who's seen you through every high and low.
Chat with Vivi
LaoLao
The path is yours to walk; I am only here to hold up a mirror.
Chat with Lao
More answers

A string constant is simply an array of char, with constant value.

char abc[] = "This is a test";

User Avatar

Wiki User

14y ago
User Avatar

Add your answer:

Earn +20 pts
Q: How string constants are declared in c?
Write your answer...
Submit
Still have questions?
magnify glass
imp