Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the benefit of using an enum rather than a #define constant?

1192


Explain built-in function?

1101


Why double pointer is used in c?

1003


List the difference between a 'copy constructor' and a 'assignment operator' in C?

1049


What’s a signal? Explain what do I use signals for?

1068


What is main return c?

944


What is the purpose of & in scanf?

1026


What is this infamous null pointer, anyway?

999


Why c is faster than c++?

990


What is actual argument?

1016


What is structure in c explain with example?

1115


Can we access array using pointer in c language?

1054


ATM machine and railway reservation class/object diagram

5203


Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]

1040


What is the best way to store flag values in a program?

1020