main()
{
char *p;
p="Hello";
printf("%c\n",*&*p);
}

Answers were Sorted based on User's Feedback



main() { char *p; p="Hello"; printf("%c\n",*&*p); } ..

Answer / surenda pal singh chouhan

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

main() { char *p; p="Hello"; printf("%c\n",*&*p); } ..

Answer / vignesh1988i

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 ?    10 Yes 2 No

Post New Answer

More C Interview Questions

how can we use static and extern?and where can we use this?

3 Answers   Excel,


Explain how can I read and write comma-delimited text?

0 Answers  


What is the difference between declaring a variable and defining a variable?

0 Answers  


Write a program in C to convert date displayed in gregorian to julian date

0 Answers   HCL, Wipro,


what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;

0 Answers   L&T,






What is Your Name :)

1 Answers  


palindrome for strings and numbers----Can anybody do the prog?

6 Answers   CTS, TCS, Vipro Lifescience Pvt,


if we take a number as a char then can we manipulate(add, subtract) on this number

2 Answers  


Output for following program using for loop only * * * * * * * * * * * * * * *

3 Answers  


Determine the result of performing two successive block transfers into the same area of a frame buffer using the binary arith operations

0 Answers  


char *p="name"; printf(p);

1 Answers  


Evaluate the following: int fn(int v) { if(v==1 || v==0) return 1; if(v%2==0) return fn(v/2)+2; else return fn(v-1)+3; } for fn(7); 1) 10 2) 11 3) 1

6 Answers  


Categories