C String Constant
String Constant in C Programming Language :
- String is “Sequence of Characters“.
- String Constant is written in Pair of Double Quotes.
- String is declared as Array of Characters.
- In C , String data type is not available.
- Single Character String Does not have Equivalent Integer Value i.e ASCII Value
Different Constant Values Contained inside String :
String with Single Character
"a"
String With Multiple Characters
"Ali"
String With Digits
"123"
String With Blanks
"How are You"
Note :
1] 'A' is not Equal to "A"
2] 'A' ==> Requires 1 byte Memory
3] "A" ==> Requires 2 byte Memory
Summary :
| Example | Meaning |
|---|---|
| “a” | String with Single Character |
| “Ali” | String With Multiple Characters |
| “123? | String With Digits |
| “How are You” | String With Blanks |
