Write a program to accept a character & display its
corrosponding ASCII value & vice versa?
Answer Posted / ashokan m
#include<stdio.h>
#include<conio.h>
main()
{
clrscr();
int x;
char y;
printf("enter the number");
scanf("%d",&x);
printf("enter the char");
scanf("%c",&y);
if(sizeof(x)==2))
{
printf("the equivalent char for given integer is %c ",x);
}
elseif(sizeof(y)==1)
printf("the equivalent integer for given char is %d ",y);
getch();
}
Is This Answer Correct ? | 38 Yes | 52 No |
Post New Answer View All Answers
Can the size of an array be declared at runtime?
What is static and auto variables in c?
State two uses of pointers in C?
What is the collection of communication lines and routers called?
PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM
Why is C language being considered a middle level language?
write a program to rearrange the array such way that all even elements should come first and next come odd
What does %d do in c?
Define recursion in c.
what are the advantages of a macro over a function?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
What do you mean by dynamic memory allocation in c?
What are the keywords in c?
How can you invoke another program from within a C program?
Is null equal to 0 in sql?