Write a program to accept a character & display its
corrosponding ASCII value & vice versa?

Answer Posted / pansare sandeep

#include <iostream.h>
#include<conio.h>
void main()
{
char c;
int d;
clrscr();
cout<<"Enter any key"<<endl;
cin>>c;
d=c;
cout<<"Corresponding ascii is "<<d;
getch();
}

Is This Answer Correct ?    11 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a dynamic array in c?

578


What is function in c with example?

614


How would you use the functions fseek(), freed(), fwrite() and ftell()?

688


What is a static function in c?

607


What is %s and %d in c?

576






What is %lu in c?

664


what is a constant pointer in C

651


What is the difference between single charater constant and string constant?

611


How do you view the path?

650


What is the use of #include in c?

566


how can I convert a string to a number?

583


Why c is called free form language?

557


how do you write a function that takes a variable number of arguments? What is the prototype of printf () function?

1481


What is the purpose of sprintf?

605


What is a class c rental property?

593