WAP to convert text into its ASCII Code and also write a
function to decode the text given?

Answers were Sorted based on User's Feedback



WAP to convert text into its ASCII Code and also write a function to decode the text given?..

Answer / harish solanki

#include<stdio.h>
#include<conio.h>
void main()
{
char c,d;
int a;
clrscr();
printf("enter character");
scanf("%c",&c);
a=c;
d=a;
printf("the ascii code is:%d",a);
printf("the character is:%c",d);
getch();
}

Is This Answer Correct ?    6 Yes 1 No

WAP to convert text into its ASCII Code and also write a function to decode the text given?..

Answer / shashank mahabdi

to convert it into ascii code just assign the entered
variable to a int(integer)variabe e.g.
int i=a
which on printing i will gie 64 as the o/p

Is This Answer Correct ?    1 Yes 6 No

Post New Answer

More C Interview Questions

what is Array?

3 Answers  


How can variables be characterized?

0 Answers  


What are local static variables?

0 Answers  


difference between c and c++

3 Answers  


Why dont c comments nest?

0 Answers  






What is the difference between fread and fwrite function?

0 Answers  


Differentiate between a structure and a union.

0 Answers   Zensar,


What is the Lvalue and Rvalue?

2 Answers  


What are multibyte characters?

0 Answers  


What is extern variable in c with example?

0 Answers  


How to write a multi-statement macro?

0 Answers  


How to print "Hi World" without using semi colon?

6 Answers   Infosys,


Categories