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

There are N egg baskets and the number of eggs in each basket is a known quantity. Two players take turns to remove these eggs from the baskets. On each turn, a player must remove at least one egg, and may remove any number of eggs provided they all belong to the same basket. The player picking the last egg(s) wins the game. If you are allowed to decide who is going to start first, what mathematical function would you use to decide so that you end up on the winning side? Upload a C program to demonstrate the behaviour of the game.

2 Answers  


How do I round numbers?

0 Answers  


Can you please explain the difference between exit() and _exit() function?

0 Answers  


Write a C program to multiply tho numbers without using arithmetic operator (+, -, *, /).

1 Answers  


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

1 Answers  






find the size of structure without using the size of function

1 Answers   Bosch,


What is ctrl c called?

0 Answers  


How do you write a program which produces its own source code as its output?

4 Answers  


What is the use of ?: Operator?

0 Answers  


What is an anonymous union and where to apply that ?

3 Answers   HP,


What is hungarian notation? Is it worthwhile?

0 Answers  


what is an ERP?

2 Answers   Infotech,


Categories