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

Answer Posted / priya.m

#include<iostream.h>
#include<conio.h>
void main()
char c;
int a;
clrscr();
cout<<"enter any word"<<photo;
cin>>c;
a=c;
cout<"corresponding ASCII is"<<a;
getch();
}

Is This Answer Correct ?    2 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the heap?

667


2) Write a program that will help Air Traffic Control for an airport to view the sequence of flights ready for take-off. The airport can accommodate 10 flights waiting for take-off at any point in time. Each flight has a unique 3 digit numeric identifier.  Each time a flight takes-off, Air Traffic Control adds a flight to the waitlist. Each time a flight is added to the waitlist, the list of flights waiting to take-off must be displayed.  When a flight is cleared for take-off, Air Traffic Control removes the flight from the waitlist. Each time a flight takes-off, the list of flights waiting to take-off must be displayed.  Sequence of take-off is the sequence of addition to the waitlist

2504


What is the difference between malloc() and calloc()?

605


What is a macro in c preprocessor?

616


Which built-in library function can be used to match a patter from the string?

729






How can I do peek and poke in c?

602


What is a void pointer? When is a void pointer used?

611


if (i = 0)printf ("True"); elseprintf("False"); Under what conditions will the above print out the string "True" a) Never b) Always c) When the value of i is 0 d) all of the above

694


Given a valid 24 hour format time find the combination of the value and write a program ,do not hard the value and if any other inputs provided should work with the logic implemented Input: 11:30 Output: 13:10 Input: 18:25 Output: 21:58

1105


Is c high or low level?

567


When can you use a pointer with a function?

553


What are the difference between a free-standing and a hosted environment?

726


write a C program:There is a mobile keypad with numbers 0-9 and alphabets on it. Take input 0f 7 keys and then form a word from the alphabets present on the keys.

14923


Are enumerations really portable?

583


What is sizeof return in c?

603