Blogger Tips And Tricks|Latest Tips For Bloggers Free Backlinks

Sunday, 11 November 2012

write a program to find the ASCII value of the given character using C language?

Find the ASCII value of the given character,ASCII value of given character,given character ASCII value,character ASCII value,write a program to find the ASCII value of the given character,ASCII value of  character,find a character ASCII value

 Program to find the ASCII value

     This program is for to print the given character (A,B,C..........Z or a,b,c,d,........z) of ASCII value.
         
         #include<stdio.h>
         main()
         {
               char ch;

                 printf("Enter Character\n");
                 scanf("%c",&ch);

                    if((ch> = 'a') && (ch < = 'z') || (ch >=  'A') && (ch <= 'Z'))

                             printf("%d\n",ch);
          }

         Output:-
                            Enter character
                                  a
                                97
                         

0 comments:

Post a Comment