ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip       Ask Questions on ANYTHING, that arise in your Daily Life at     FORUM9.COM
Google
 
Categories  >>  Software  >>  Programming Languages  >>  C
 
 


 

 
 C interview questions  C Interview Questions
 C++ interview questions  C++ Interview Questions
 VC++ interview questions  VC++ Interview Questions
 Delphi interview questions  Delphi Interview Questions
 Programming Languages AllOther interview questions  Programming Languages AllOther Interview Questions
Question
WAP to convert text into its ASCII Code and also write a 
function to decode the text given?
 Question Submitted By :: Rakesh Sharma
I also faced this Question!!     Rank Answer Posted By  
 
  Re: WAP to convert text into its ASCII Code and also write a function to decode the text given?
Answer
# 1
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 ?    0 Yes 0 No
Shashank Mahabdi
 
  Re: WAP to convert text into its ASCII Code and also write a function to decode the text given?
Answer
# 2
#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 ?    1 Yes 0 No
Harish Solanki
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
how to estimate the disk access time? e.g. the time between read one byte and another byte in the disk. Google3
WRITE A PROGRAM TO PRINT THE FOLLOWING OUTPUTS USING FOR LOOPS. A) * B) ***** *** * * ***** * * *****  2
Why is conio.h not required when we save a file as .c and use clrscr() or getch() ?  2
write a program to generate 1st n fibonacci prime number  5
program to get the remainder and quotant of given two numbers with out using % and / operators? IBM8
what is the function of .h in #include<stdio.h> in c ? IBM9
how to find out the reverse number of a digit if it is input through the keyboard?  2
what is the diff between the printf and sprintf functions?? and what is the syntax for this two functions ??  4
what is compiler  5
Is there any restriction in how many arguments printf or scanf function can take? in which file in my c++ compiler i can see the code for implementation of these two functions??  3
program for comparing 2 strings without strcmp()  3
34.what are bitwise shift operators? 35.what are bit fields? What is the use of bit fields in a structure declaration? 36.what is the size of an integer variable? 37.what are the files which are automatically opened when a c file is executed? 38.what is the little endian and big endian? 39.what is the use of fflush() function? 40.what is the difference between exit() and _exit() functions? 41.where does malloc() function get the memory? 42.what is the difference between malloc() and calloc() function? 43.what is the difference between postfix and prefix unary increment operators?  2
Write a program for deleting duplicate elements in an array Subex3
Print the foll in C...eg when n=5 the o/p must b + + + + + + + + + + + + + + + + +  1
what is real time system?what is the differance between hard and soft real time systems  2
what is the difference between c and java?  1
Struct(s) { int a; long b; } Union (u) {int a; long b; } Print sizeof(s)and sizeof(u) if sizeof(int)=4 and sizeof(long)=4 Mascot2
Write a program that accepts a string where multiple spaces are given in between the words. Print the string ignoring the multiple spaces. Example: Input: “ We.....Are....Student “ Note: one .=1 Space Output: "We Are Student" IBM4
if a person is buying coconuts of Rs10,and then sell that coconuts of Rs9,with the loss of one rupee.After that the person became a millaniore.how? Wipro5
difference between memcpy and strcpy  1
 
For more C Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com