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                      
Do you have a collection of Interview Questions and interested to share with us!!
Please send that collection to along with your userid / name. ThanQ
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
 
WAP to accept rollno,course name & marks of a student & display grade if total marks is above 200?  2
Is the C language is the portable language...If yes...Then Why...and if not then what is problem so it is not a Portable language..??? TCS1
15.what is the disadvantage of using macros? 16.what is the self-referential structure? 17.can a union be self-referenced? 18.What is a pointer? 19.What is the Lvalue and Rvalue? 20.what is the difference between these initializations? 21.Char a[]=”string”; 22.Char *p=”literal”; 23.Does *p++ increment p, or what it points to? CTS2
what is the use of call back function in c?tell me with example  1
Which of the following is not an infinite loop ? a.while(1){ .... } b.for(;;){ ... } c.x=0; do{ /*x unaltered within theloop*/ ... }while(x==0); d.# define TRUE 0 ... while(TRUE){ .... } TCS4
how to print a statement in c without use of console statement ,with the help of if statement it should print Satyam2
write a c program to check weather a particluar bit is set or not? IBM4
How can I allocate arrays or structures bigger than 64K?  4
what is use#in c  3
Write a program to exchange two variaables without temp Geometric-Software6
void main() { int s[4][2]={ {1234,56},{1212,33},{1434,80},{1312,78} }; int (*p)[2]; int i,j,*pint; for(i=0;i<=3;i++) { p=&s[i]; pint=p; printf("\n"); for(j=0;j<=1;j++) printf("%d",*(pint+j)); } } while running this program it shows a warning-suspicious pointer conversion ie pint=p; my que is why should we assign the value of p to pint again.why cant we use it directly as *(p+j)..but if i use like tat the o/p is garbage value..  1
Why the use of alloca() is discouraged? Oracle2
will u give me old quesrion papers for aptitude for L & t info tech? L&T1
for(i=1;i>0;i++); printf("i=%d",i); what will be the answer????  6
What are the different pointer models in c?  3
Write a program or provide a pseudo code to flip the 2nd bit of the 32 bit number ! (Phone Screen) NetApp1
how do u find out the number of 1's in the binary representation of a decimal number without converting it into binary(i mean without dividing by 2 and finding out the remainder)? three lines of c code s there it seems...can anyone help  2
helllo sir , what is the main use of the pointer ,array ,and the structure with the example of a programe  2
how can we use static and extern?and where can we use this? Excel3
pointer_variable=(typecasting datatype*)malloc(sizeof(datatype)); This is the syntax for malloc?Please explain this,how it work with an example? Excel2
 
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