GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C
Go To First  |  Previous Question  |  Next Question 
 C  |  Question 129 of 453    Print  
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
Choose the correct option


  
Total Answers and Comments: 7 Last Update: October 11, 2006     Asked by: Lokesh M 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
November 21, 2005 21:56:14   #1  
pranavtank        

RE: What is the type of the variable b in the followin...
pointer to float
 
Is this answer useful? Yes | No
November 22, 2005 09:58:51   #2  
Dhiraj        

RE: What is the type of the variable b in the followin...
The answer is Option Ahere the statement FLOATPTR a b;becomes float* a b;here a is a float pointer but b is just an float variable.so the correct type for b is float and not float-pointer
 
Is this answer useful? Yes | No
November 24, 2005 22:06:04   #3  
vamsi krishna        

RE: What is the type of the variable b in the followin...

Answer is:a)float


 
Is this answer useful? Yes | No
November 26, 2005 04:33:40   #4  
nsivaramprasad Member Since: November 2005   Contribution: 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
 
Is this answer useful? Yes | No
August 19, 2006 05:55:25   #5  
Mamata V Ritti        

RE: What is the type of the variable b in the followin...

The answer is option a ie float


 
Is this answer useful? Yes | No
October 10, 2006 06:32:46   #6  
datta.s.k        

RE: What is the type of the variable b in the followin...
int
 
Is this answer useful? Yes | No
October 11, 2006 15:23:25   #7  
Rohit Kumar Sharma        

RE: What is the type of the variable b in the followin...
fine that is correct.many commit mistake here carelessly.
 
Is this answer useful? Yes | No


 
Go To Top


 Sponsored Links

 
About Us -  Privacy Policy -  Terms and Conditions -  Contact -  Ask Question -  Propose Category -  Site Updates 

Copyright © 2005 - 2009 GeekInterview.com. All Rights Reserved

Page copy protected against web site content infringement by Copyscape