Write a program to accept a character & display its
corrosponding ASCII value & vice versa?
Answer Posted / pawankumar
#include<stdio.h>
#include<conio.h>
void main()
{
clrscr();
int x;
char y;
printf("enter the number");
scanf("%d",&x);
printf("enter the char");
scanf(" %c",&y);
if(sizeof(x)==4)
{
printf("the equivalent char for given
integer is %c ",x);
}
if(sizeof(y)==1)
{
printf("the equivalent integer for given
char is %d ",y);
}
}
| Is This Answer Correct ? | 8 Yes | 15 No |
Post New Answer View All Answers
What is && in c programming?
What is putchar() function?
What is oops c?
Write a program to reverse a given number in c language?
How to explain the final year project as a fresher please answer with sample project
A collection of data with a given structure for excepting storing and providing on demand data for multiple users a) linked list b) datastructer c) database d) preprocessor
Explain do array subscripts always start with zero?
What is difference between structure and union in c programming?
Is null always equal to 0(zero)?
Why is c so popular?
What are the 3 types of structures?
Is boolean a datatype in c?
What is the difference between variable declaration and variable definition in c?
What is advantage of pointer in c?
I have a varargs function which accepts a float parameter?