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 quick sort in c?
What is the symbol indicated the c-preprocessor?
Describe newline escape sequence with a sample program?
Explain how do you search data in a data file using random access method?
What is an arrays?
What are the types of i/o functions?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
What is #include stdio h?
What is volatile c?
explain what are actual arguments?
What is fflush() function?
What is array of structure in c?
what will be maximum number of comparisons when number of elements are given?
How reliable are floating-point comparisons?
What are inbuilt functions in c?