Write a program to accept a character & display its
corrosponding ASCII value & vice versa?

Answers were Sorted based on User's Feedback



Write a program to accept a character & display its corrosponding ASCII value & vice versa..

Answer / govindkrishna

#include<stdio.h>
#include<conio.h>
main()
{
char ch;
printf("enter any charecter %c /n");
scanf("%c ",&ch);
printf("the ACSCII value is %d= /n",ch);
}

Is This Answer Correct ?    61 Yes 30 No

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

Answer / priya

Can any one tell me the answer....
if any one knows the answer pls mail the answer at this id
plsss
priya_del06@yahoo.com

Is This Answer Correct ?    33 Yes 16 No

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

Answer / rukmanee

#include<stdio.h>
#include<conio.h>
void main()
{
char ch;
clrscr();
printf("\n enter a character :");
scanf("%c",&ch);
printf("the corresponding ascii value of the given
character is %d",ch);
getch();
}

Is This Answer Correct ?    31 Yes 17 No

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

Answer / pansare sandeep

#include <iostream.h>
#include<conio.h>
void main()
{
char c;
int d;
clrscr();
cout<<"Enter any key"<<endl;
cin>>c;
d=c;
cout<<"Corresponding ascii is "<<d;
getch();
}

Is This Answer Correct ?    11 Yes 6 No

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

Answer / sanjay malik

#include<stdio.h>
main()
{
char ch;
printf("ENTER A CHARACTER: ");
scanf("%c",&ch);
printf("THE ASCII CODE IS %d",ch);}

Is This Answer Correct ?    0 Yes 1 No

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

Answer / priya.m

#include<iostream.h>
#include<conio.h>
void main()
char c;
int a;
clrscr();
cout<<"enter any word"<<photo;
cin>>c;
a=c;
cout<"corresponding ASCII is"<<a;
getch();
}

Is This Answer Correct ?    2 Yes 4 No

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

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

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

Answer / nigus alene

#2 is correct.

Is This Answer Correct ?    10 Yes 18 No

Write a program to accept a character & display its corrosponding ASCII value & vice versa..

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

More C Interview Questions

Function shall sum members of given one-dimensional array. However, it should sum only members whose number of ones in the binary representation is higher than defined threshold (e.g. if the threshold is 4, number 255 will be counted and 15 will not) - The array length is arbitrary - output the results to the stdout

0 Answers   XYZ,


What is period operator in c?

3 Answers   Wipro,


What is abstract data structure in c?

0 Answers  


pierrot's divisor program using c or c++ code

0 Answers  


what is the c source code for the below output? 5555555555 4444 4444 333 333 22 22 1 1 22 22 333 333 4444 4444 5555555555

0 Answers   Wipro,


Devise a program that inputs a 3 digit number n and finds out whether the number is prime or not. Find out its factors.

0 Answers   TCS,


Is main() function predfined or userdefined?

11 Answers  


write function to reverse char array ... without using second array

3 Answers  


Are local variables initialized to zero by default in c?

0 Answers  


A routine usually part of the operation system that loads a program into memory prior to execution a) linker b) loader c) preprocessor d) compiler

0 Answers  


What are the features of c languages?

0 Answers  


How can I convert integers to binary or hexadecimal?

2 Answers  


Categories