READ about Constants: § 2.3, The C Programming Language, pp 36-37.

Constants

Simple and Compound

Here are 7 C constants with different types:

50
'A'
50.
"23"
{6, 2, 23}
{"6", "dog", "cat", "cynic"}
{'c', 'a', 't'}

The first three types are numbers. The type of the first value is int (integer). The type of the second value is char (character). Char values are small integers, less than 128. On the CS server 'A' stands for 65. The CS server uses ASCII codes (American Standard Code for Information Interchange) to represent characters. There is an ASCII code for for any character (key) that you type: letters, digits, punctuation, spaces, tabs, etc. We say that 65 is the ASCII code for the character A. Consecutive letters and digits have consecutive codes. That is 'B' is the value 66. The char type is really a sub-type of int. The first value above, 50, is small enough (less than 128) to be a char. In fact 50 or '2' is the code for the digit, 2. Other ASCII codes:

'a'     97   code for the lower case a.
'0'     48   code for the character zero.
' '     32   code for the space character.
'\t'     9   code for the tab.
'\n'    10   code for the newline character.
'\0'     0   a zero.
'\"'    34   code for the double quote character.
The backslash (\) is an escape. It tells us and the C compiler that what comes next is special. '\t' is NOT the code for letter t. It is the code for the tab character. When the newline character is printed a new line is started on the computer screen. Example: the statement printf("cat\ndog")
cat
dog
You can also make characters from their codes. First convert the code to octal (base eight). Base eight allows eight digits: 0, 1, 2, 3, 4, 5, 6, 7. And place values go up by a factor of 8. That is, the right most place is the ones place. Multiply that by 8. The next place to the left is the eights place. Multiply that by 8. The next place to the left is the sixty-fours place. See below:
_ _ _
    ^ ones place
  ^ eights place
^sixty-fours place
For example the code for 'A' is 65 in decimal (base ten). And 65 is 1 sixty-four and 1 one. So the octal is 101. The value
'\101'

is an alternate for 'A'. Similarly '\62' is an alternate for '2'

The type of the third value is float or double (floating point, --number with a decimal point). The C language stores these numbers in memory in scientific notation format.

The fourth value type is string. A string is just one character after another like beads on a string. The double quotes are delimiters. They just mark the beginning and end of the string in the program, but are not considered to be in the string. In memory, the character codes of a string are stored in consecutive memory cells. For the string "23" what is stored is 50, 51, 0. Note: character codes are NON-ZERO. The quotes are not stored. A zero is stored at end of the string. It marks the end of the string. Within the program the string value itself marks the beginning of the string in memory. For instance in a program string "23" stands for the address in memory where the code of the 2 is stored. The printf function prints the characters of the string until the zero at the end is reached. No quotes are printed because no quotes are stored.

The fifth, sixth, and seventh values are arrays. Array constants are delimited with curly braces { }. Unlike strings, individual items of arrays are separated by commas. Also unlike strings the items in a array do not have to be characters, they are C values. The fifth value above is an array of int. The sixth value above is an array of strings. The seventh value above is an array of char. Thus we always have an array of some type. The values of an array are stored in consecutive memory cells. Arrays work a little like strings: They are stored in memory, and within the program the array name is the address of the first item in the array. Unlike strings there is no zero to mark to mark the end of the array.

Strings and arrays are both sequences. They contain a first item, a second item and so on. String and array operations.

  1. Indexing. The number in the square brackets says what item we want. It is called the index or position of the item in the string or array. Index zero corresponds to the first item in the string or array:
    "something"[0] is the code of the s
    "something"[5] is the code of the h
    {"6", "dog", "cat", "cynic"}[1] is "dog"
    {"6", "dog", "cat", "cynic"}[1][2] is the code of g
    
  2. Address arithmetic.
    "something"+1  is the string "omething"
    "something"+4  is the string "thing"
    {"6", "dog", "cat", "cynic"}+2 is the array {"cat", "cynic"} 
    
  3. Dereference. When the operator * is put between two numerics (values or variables) it means multiplication. However when it is put in front of an address, the * dereferences the address: it gives you the cell at that address or its content. Thus
    *"something"  is the  code of the s
    *("something"+5) is the code of the h
    *({"6", "dog", "cat", "cynic"}+1) is "dog"
    *(*({"6", "dog", "cat", "cynic"}+1)+2) is the code of the g
    

Next: Array Defintions