Write a program to accept a character & display its
corrosponding ASCII value & vice versa?
Answer Posted / pawankumar
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x;
char y;
printf("enter the number");
scanf("%d",&x);
printf("enter the char");
scanf(" %c",&y);
if(sizeof(x)==4)
{
printf("the equivalent char for given
integer is %c ",x);
}
if(sizeof(y)==1)
{
printf("the equivalent integer for given
char is %d ",y);
}
}
| Is This Answer Correct ? | 8 Yes | 15 No |
Post New Answer View All Answers
What is huge pointer in c?
What is c value paradox explain?
What is wrong with this initialization?
How can I recover the file name given an open stream or file descriptor?
please explain clearly about execution of c program in detail,in which stage are the printf sacnf getting into exeecutable code
Do you know what are bitwise shift operators in c programming?
Why structure is used in c?
How can I find out the size of a file, prior to reading it in?
What are the advantages of the functions?
What is malloc calloc and realloc in c?
What does it mean when the linker says that _end is undefined?
Hello. How to write a C program to check and display president party like if i type in the console "biden" and hit enter the output shoud be : "biden is democrat" and if i type "trump" and hit enter the output shoud be: "trump is republican"
Whats s or c mean?
What is n in c?
What are the advantages of c language?