Character constant


	= 1 character variable of one byte in memory, since the memory is a binary ASCII character code, with the integer data storage Similarly, character data and integer data may be another operation. 
	Note that the string constants allowed to assign values to string variables, C language nor special string variable. To access the string in memory, or can use an array pointer 
	* /


	 
	

	

	the printf ( "========================"); 

	// special case character 
	char CHl = '0'; 
	char CH2 = 0; 
	char = CH3 ' \ 0 '; 
	the printf ( "% D, C% \ n-", CHl, CHl); //' 0'ASCII characters corresponding to the character number is 48, the output 48 '0' 
	the printf ( "% D, C% \ n- ", ch2, ch2); // integer of 0 corresponding to ASCII characters is NULL, it '\ 0' output nothing 0, 
	the printf ("% D, C% \ n-", CH3, CH3); // ' \ 0 'is ASCII character is NULL, i.e.,' \ 0 'output nothing 0, 
		getchar (); 
}

 

Guess you like

Origin www.cnblogs.com/luoxuw/p/11220335.html