What is the type of the variable b in the following declaration? #define FLOATPTR float* FLOATPTR a,b; a) float b) float pointer c) int d) int pointer

This question is related to Sonata Interview

Showing Answers 1 - 18 of 18 Answers

spd

  • Sep 9th, 2005
 

float * :p

  Was this answer useful?  Yes

nirupama

  • Dec 28th, 2005
 

float

  Was this answer useful?  Yes

Vinnie

  • Feb 20th, 2012
 

a) float is the right answer

  Was this answer useful?  Yes

neeraj

  • Jul 16th, 2012
 

float

  Was this answer useful?  Yes

b is a plain float.

FLOATPTR a,b; expands to float* a,b;, which is *parsed* as float (*a),b;. The * is bound to the declarator, not the type specifier, so only a is declared as a pointer to float.

  Was this answer useful?  Yes

shivprasad

  • Nov 2nd, 2012
 

b) float pointer

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions