Thursday 2 August 2012

Basic C Programming014

Input a character from user and print its ASCII value.


#include <stdio.h>
#include <conio.h>
void main ( )
{
          char       x;
          clrscr ( );
                     
          printf ("\n\n\n\t\t Input a character..:"); scanf ("%c",&x);
            
          printf("\n\n\n\t\t ASCII value of '%c' is %d", x, x);
          getch ( );
}

Click here to contact us 

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...