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
How can I implement sets or arrays of bits?
Write a program to reverse a linked list in c.
Explain how can I prevent another program from modifying part of a file that I am modifying?
What is #include stdio h?
what are the facialities provided by you after the selection of the student.
How will you write a code for accessing the length of an array without assigning it to another variable?
What is the use of putchar function?
What are pragmas and what are they good for?
What is getch c?
Explain how do you determine whether to use a stream function or a low-level function?
Explain what are run-time errors?
Why dont c comments nest?
Explain what is the best way to comment out a section of code that contains comments?
How was c created?
Which node is more powerful and can handle local information processing or graphics processing?