3/22/21

C Program to Find ASCII Value of Character.


C program to find out the ASCII code of any Character.

Method 1

#include<stdio.h>

void main()

{

int a;

char ch;

printf("Enter any character:");

scanf("%c",&ch);

a=ch;

printf("ASCII value of %c is %d",ch,a);

getch();

}


Method 2

#include <stdio.h>

void main()

{

char c;

printf("Enter any character =");

scanf("%c", &c);

printf("ASCII Value is = %d",c);

return 0;

}

Output:-





2 comments:

  1. Their collaborative and thorough approach partner to create a successful engagement
    developing a logo

    ReplyDelete
  2. You create sense out of the foremost complex topics.
    user experience consulting

    ReplyDelete

Like us on facebook

blogger templatesblogger widgets

Follow on Twitter

Linkedin

Categories

Mad About Computer. Powered by Blogger.