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

Can the size of an array be declared at runtime?

591


What is static and auto variables in c?

546


State two uses of pointers in C?

626


What is the collection of communication lines and routers called?

600


PLS U SENS ME INTERVIEW O. MY EMAIL ADD, SOFIYA.SINGH@GMAIL.COM

1688






Why is C language being considered a middle level language?

637


write a program to rearrange the array such way that all even elements should come first and next come odd

1744


What does %d do in c?

533


Define recursion in c.

688


what are the advantages of a macro over a function?

631


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

598


What do you mean by dynamic memory allocation in c?

635


What are the keywords in c?

632


How can you invoke another program from within a C program?

607


Is null equal to 0 in sql?

634