Category:C: Difference between revisions

Content added Content deleted
Line 91: Line 91:
char letter = "A";
char letter = "A";
//declare the variable "letter" of type char, it equals capital A.
//declare the variable "letter" of type char, it equals capital A.
//C allows you to treat an ascii value as a numeral whenever you feel like it. Other languages do not.
//C allows you to treat an ascii value as its numeric equivalent whenever you feel like it. Other languages do not.


char myString = "Hello"; //define the array "myString" containing the letters "Hello" followed by a null terminator.
char myString = "Hello"; //define the array "myString" containing the letters "Hello" followed by a null terminator.