-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexp-6-20.c
More file actions
38 lines (33 loc) · 745 Bytes
/
exp-6-20.c
File metadata and controls
38 lines (33 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*************************************************************************
> File Name: exp-6-20.c
> Author: xiaoxiaoh
> Mail: xiaoxxhao@gmail.com
> Created Time: Fri Jul 7 16:07:38 2017
************************************************************************/
/*
* Write a C program to print all ASCII character with their values.
*
* Example
*
* Input
*
* Output
* ASCII value of character = 0
* ASCII value of character ☺ = 1
* ...
* ...
* ASCII value of character ■ = 254
* ASCII value of character = 255
*
*/
#include <stdio.h>
int main()
{
int i;
// how to print ASCII value big than 127, "?"
for(i=0; i<=255; i++)
{
printf("ASCII value of character %c = %d\n", i, i);
}
return 0;
}