![]() |
| How to print ASCII Code of character values | C Language Practice | IndianTechnoEra |
Here we will see that how can we print all the ASCII Codes of characters. We'll use simple c language and we will find that with using very easy steps to use for loop.
Steps:
- Including header and main functions.
- Taking a variable.
- Using for loop
- Output to print with %c for character value and %d will be that integer value.
Code :
// To print ASCII code of characters //
#include<stdio.h>
int main(){
int i;
for (i=0;i<=255; i++){
printf("\nThe ASCII code of character %c is integer %d.",i,i);
}
return 0;
}
Output:

