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 does == mean in texting?

0 Answers  


What are dangling pointers?

1 Answers  


What are the different types of linkage exist in c?

0 Answers  


What is volatile c?

0 Answers  


please give me some tips for the placement in the TCS.

0 Answers   TCS,






Is c call by value?

0 Answers  


Diff between for loop and while loop?

2 Answers   TCS,


main() { intj; while9j<=10) { printf("\n%d",j); j=j+1; } }

4 Answers  


What does void main () mean?

0 Answers  


write a program in C that prompts the user for today's date,tomorrow's date and display the results.Use structures for today's date,tomorrow's date and an array to hold the days for each month of the year.

0 Answers   HCL,


Are pointers integers in c?

0 Answers  


write a program that accepts 3 numbers from the user. dispaly the values in a descending order.

3 Answers  


Categories