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 / 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

What are the different categories of functions in c?

1138


program for reversing a selected line word by word when multiple lines are given without using strrev

2483


What is the difference between specifying a constant variable like with constant keyword and #define it? i.e what is the difference between CONSTANT FLOAT A=1.25 and #define A 1.25

1988


Can you please explain the difference between syntax vs logical error?

1194


typedef enum { html, java, javascript, perl, cgi } lang;The above statement defines a : a) Union b) User defined type c) Enumerated variable d) none

1203


What is volatile variable how do you declare it?

1104


How to get string length of given string in c?

1068


What is far pointer in c?

1318


Compare array data type to pointer data type

1041


What is the difference between the local variable and global variable in c?

967


What are the 4 types of organizational structures?

1109


difference between native and cross compilers

2135


Tell me when would you use a pointer to a function?

1068


Where static variables are stored in c?

1112


How do you initialize pointer variables?

1107