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


Please Help Members By Posting Answers For Below Questions

How can I implement sets or arrays of bits?

613


Write a program to reverse a linked list in c.

655


Explain how can I prevent another program from modifying part of a file that I am modifying?

650


What is #include stdio h?

696


what are the facialities provided by you after the selection of the student.

1666






How will you write a code for accessing the length of an array without assigning it to another variable?

624


What is the use of putchar function?

659


What are pragmas and what are they good for?

584


What is getch c?

866


Explain how do you determine whether to use a stream function or a low-level function?

640


Explain what are run-time errors?

616


Why dont c comments nest?

627


Explain what is the best way to comment out a section of code that contains comments?

732


How was c created?

601


Which node is more powerful and can handle local information processing or graphics processing?

844