They are all constants, there are the character constants ,like 'a' 'A' 'b' 'B' etc. Oh almost forget the string type constants ,examples are "Hello world" ,"GOOD JOB",.....Here we must focus on the quotes , single quotes ' ' and double quotes " ". When I was freshman ,I always confused by the quotes.Lately , i found that the single surely represented a single alphabet , double followed many alphabets . Now there are also some common constants ,represent one character but consist of two characters like '\n','\0','\a'....these constants used to output functions, in the further chapters I will tell u.
In "Let us learn C in Code <2>" or previous series , we know the keyword and variables ,for example , "float a = 1.0"; "float b = 2.0". float is keyword , a and b are variables ,
The variable is a data name or a place to hold the data , how can we declare a variable and what 's the rules ?
Variable XXXXXX.....
Position 1234678.....
0) the first position must be a letter or underscore "_", other position is digital ,letter,or underscore.
1) the position is more than 0 but less than 31(not sure ) Another way of saying the variable is less than 31 characters;
2) The variable is not a keyword;
3) Any character is not white space;
4) Significant with Uppercase and lowercase, so “int Hello = 0;" and" int hello = 0;" represent different variables.
Ok ,that's enough, before finishing this chapter ,let us solve the problem previous article described.
main()
{
float a = 1.0;
float b = 2.0;
float c = 0;
c = a +b;
}
Have a nice day! Good night everyone who see this blog. Thank you........