GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Tech FAQs  >  Programming  >  C

 Print  |  
Question:  Find ASCII value.

Answer: How to find the ASCII value of an element ?


August 08, 2008 06:12:01 #1
 chandrikakr CRM Expert  Member Since: July 2008    Total Comments: 2 

RE: Find ASCII value.
 
try this code:
#include<stdio.h>
#include<conio.h>
main()
{
    char a;
    clrscr();
    puts("Enter a character:");
    a=getchar();
    printf("nnThe ascii code of %c is %d",a,a);
    getch();
}
     

 

Back To Question