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
main()
{
 char *p;
 p="Hello";
 printf("%c\n",*&*p);
}
 Question Submitted By :: Surenda Pal Singh Chouhan
I also faced this Question!!     Rank Answer Posted By  
 
  Re: main() { char *p; p="Hello"; printf("%c\n",*&*p); }
Answer
# 1
H 

Explanation:
* is a dereference operator & is a reference  operator. 
They can be    applied any number of times provided it is 
meaningful. Here  p points to  the first character in the 
string "Hello". *p dereferences it and so its value is H.
 
Is This Answer Correct ?    3 Yes 0 No
Surenda Pal Singh Chouhan
 
  Re: main() { char *p; p="Hello"; printf("%c\n",*&*p); }
Answer
# 2
the output will be 'H'...... this is because... first  the
variables with pointers  as:
                               *
                               &
                               *
                               p
so it woill process as givwn above in stack
 
Is This Answer Correct ?    2 Yes 0 No
Vignesh1988i
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
What is external and internal variables What is dynamic memory allocation what is storage classes in C  2
Who had beaten up hooligan "CHAKULI" in his early college days?  1
enum colors {BLACK,BLUE,GREEN} main() { printf("%d..%d..%d",BLACK,BLUE,GREEN); return(1); } ME3
What compilation do? Geometric-Software7
what is the difference between arrays and linked list Tech-Mahindra15
program for validity of triangle from 3 side  6
Average of a couple 10 years ago was 25. The average remains same after having a child and twins after 3 years. What is the present age of the first child IBM9
pointer_variable=(typecasting datatype*)malloc(sizeof(datatype)); This is the syntax for malloc?Please explain this,how it work with an example? Excel2
To find whether a number is even or odd without using any conditional operator?? IBM4
What is the difference between null pointer and void pointer CTS3
what's the return value of malloc()  8
What is volatile in c language? HCL1
#ifdef TRUE int I=0; #endif main() { int j=0; printf("%d %d\n",i,j); } ADITI2
biggest of two no's with out using if condition statement  2
how many argument we can pas in in a function CTS20
what is the output of following question? void main() { int i=0,a[3]; a[i]=i++; printf("%d",a[i] }  2
how to find the size of the data type like int,float without using the sizeof operator?  7
what is pointer TCS1
what type of language is C? Microsoft2
Binary tree traversing Qualcomm1
 
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