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
What is c basic?
Write a program in "C" to calculate the root of a quadratic equation ax^2+bx+c=0, where the value of a,b & c are known.
What are categories used for in c?
How can you avoid including a header more than once?
Explain what is wrong with this program statement?
What is d scanf?
What is meant by inheritance?
How can you find out how much memory is available?
How many header files are in c?
what do the 'c' and 'v' in argc and argv stand for?
Do string constants represent numerical values?
What are pointers? Why are they used?
How important is structure in life?
List some of the dynamic data structures in C?
What is header file definition?