GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Programming  >  C

 Print  |  
Question:  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


Answer: Choose the correct option


November 11, 2005 04:33:40 #4
 Sivaram Prasad Nakkala Microsoft Expert  Member Since: November 2005    Total Comments: 6 

RE: What is the type of the variable b in the followin...
 
Answer is a) float.The above problem demonstrate the drawback of using #define constant. To avoid this situation use typedef's inplace of #define . Then code works as expected.Sivaram Prasad Nakkala
     

 

Back To Question