C Programming

Solved Example

Practice Questions

Exercise Question

Program to print ASCII values along with corresponding characters

Objective

Write a program to print all the ASCII blues along with their equivalent characters. The ASCII values vary from 0 to 255.

Program / Solution

#include<stdio.h>
int main() {
	int i;
	
	i = 0;
	while (i <= 255) {
		printf("%d - %c\t",i,i);
		i++;
	}
	
	return 0;
}