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
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 ?    1 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 ?    1 Yes 0 No
Vignesh1988i
 
 
 

 
 
 
Other C Interview Questions
 
  Question Asked @ Answers
 
write a program to arrange the contents of a 1D array in ascending order  2
f(char *p) { p=(char *)malloc(sizeof(6)); strcpy(p,"HELLO"); } main() { char *p="BYE"; f(p) printf("%s",p); } what is the output? Hughes6
prototype of sine function. Cadence2
True or false: If you continuously increment a variable, it will become negative? 1) True 2) False 3) It depends on the variable type  4
main() { int x=5; printf("%d %d %d\n",x,x<<2,x>>2); } CitiGroup3
HOW DO YOU HANDLE EXCEPTIONS IN C? AppLabs2
Look at the Code: main() { int a[]={1,2,3},i; for(i=0;i<3;i++) { printf("%d",*a); a++; } } Which Statement is/are True w.r.t the above code? I.Executes Successfully & Prints the contents of the array II.Gives the Error:Lvalue Required III.The address of the array should not be changed IV.None of the Above. A)Only I B)Only II C)II & III D)IV Accenture2
write a program to swap bits in a character and return the value prototype of function char fun (char a, charb flag c) where fun returns a char, char a is a the value char b is the bit to be changed and flag c is the bit value for eg: x=fun(45,7,0) since 45 is 0010 0101 and ow x should contain the value 65 (0110 0101) Bosch1
how does the for loop work actually..suppose for the following program how it ll work plz explain to me for(i=5;i>=0;i--) prinf(i--); RMSI13
which of the following statements is incorrect a.typedef struct new{ int n1; char n2; } DATA; b.typedef struct { int n3; char *n4; }ICE; c.typedef union { int n5; float n6; } UDT; d.#typedef union { int n7; float n8; } TUDAT; TCS5
1.what are local and global variables? 2.what is the scope of static variables? 3.what is the difference between static and global variables? 4.what are volatile variables? 5.what is the use of 'auto' keyword? 6.how do we make a global variable accessible across files? Explain the extern keyword? 7.what is a function prototype? 8.what does keyword 'extern' mean in a function declaration?  1
pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc() TCS1
what is the difference between arrays and linked list Tech-Mahindra7
main() { printf(5+"Vidyarthi Computers"); }  5
what is the stackpointer  2
N O S I E R + A S T R A L ---------------- 7 2 5 6 1 3 Honeywell1
read the folllowing code # define MAX 100 # define MIN 100 .... .... if(x>MAX) x=1; else if(x<MIN) x=-1; x=50; if the initial value of x=200,what is the vlaue after executing this code? a.200 b.1 c.-1 d.50 TCS2
What is Heap?  3
WAP &#8211; represent a char in binary format Motorola4
What is #pragma directive?how it is used in the program? what is its advantages and disadvantages?  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