Q:

Write C program to print ASCII values of all characters.

0

Write C program to print ASCII values of all characters.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

#include <stdio.h>

int main()
{
    int i;

    // Printing ASCII values from 0 to 255
    for(i=0; i<=255; i++)
    {
        printf("ASCII value of %c = %d\n", i, i);
    }

    return 0;
}

Result:

ASCII value of � = 235

ASCII value of � = 236

ASCII value of � = 237

ASCII value of � = 238

ASCII value of � = 239

ASCII value of � = 240

ASCII value of � = 241

ASCII value of � = 242

ASCII value of � = 243

ASCII value of � = 244

ASCII value of � = 245

ASCII value of � = 246

ASCII value of � = 247

ASCII value of � = 248

ASCII value of � = 249

ASCII value of � = 250

ASCII value of � = 251

ASCII value of � = 252

ASCII value of � = 253

ASCII value of � = 254

ASCII value of � = 255

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Write C program to print multiplication table of a... >>
<< Write C program to print alphabets from a to z....