C Programming

PRINTING OUT THE ASCII VALUES OF CHARACTERS
Enclosing the character to be printed within single quotes will instruct the compiler to print out the Ascii value of the enclosed character.


	printf("The character A has a value of %d\n", 'A');

The program will print out the integer value of the character A.


EXERCISE C20
What would the result of the following operation be?


	int c;
	c = 'a' + 1;
	printf("%c\n", c);

Answer


©Copyright B Brown. 1984-1999. All rights reserved.