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

If the static variable is declared as global, will it be same as extern?

1 Answers   Samsung,


what type of questions arrive in interview over c programming?

0 Answers  


Are comments included during the compilation stage and placed in the EXE file as well?

0 Answers  


Without using main fn and semicolon,print remainder for a given number in C language

2 Answers  


Is c is a middle level language?

0 Answers  


Can the size of an array be declared at runtime?

0 Answers  


Why is a semicolon (;) put at the end of every program statement?

0 Answers  


write a program fibonacci series and palindrome program in c

0 Answers   Aditi Placement Service,


The postoder traversal is 7,14,3,55,22,5,17 Then ur Inorder traversal is??? please help me on this

1 Answers  


What is period operator in c?

3 Answers   Wipro,


how to find a 5th bit is set in c program

4 Answers   IBM,


write a program to find lcm and hcf of two numbers??

1 Answers  


Categories