GeekInterview.com
  I am new, Sign me up!
 
GeekInterview.com  >  Interview Questions  >  Programming  >  C++
Go To First  |  Previous Question  |  Next Question 
 C++  |  Question 106 of 203    Print  
How many parameters can be passed to a function in c++ ?

  
Total Answers and Comments: 8 Last Update: December 07, 2008     Asked by: bharat biswal 
  
 Sponsored Links

 
 Best Rated Answer

No best answer available. Please pick the good answer available or submit your answer.
December 28, 2006 03:49:54   #1  
radha        

RE: How many parameters can be passed to a function in...
zero or more
 
Is this answer useful? Yes | No
January 16, 2007 06:42:02   #2  
vmshenoy Member Since: October 2005   Contribution: 508    

RE: How many parameters can be passed to a function in...
how zero?

zero means there is no parameter! answer should be 1 or more

 
Is this answer useful? Yes | No
January 23, 2007 13:05:18   #3  
Mike        

RE: How many parameters can be passed to a function in...
zero is certainly an acceptable answer as it is a valid number.
 
Is this answer useful? Yes | No
January 23, 2007 23:14:41   #4  
vmshenoy Member Since: October 2005   Contribution: 508    

RE: How many parameters can be passed to a function in...
Hi mike We are not talking of zero as a number but we are talking about number of parameters!Passing zero number of parameters means we are not passing any argument!
 
Is this answer useful? Yes | No
January 26, 2007 06:04:05   #5  
Nitin Bhatt        

RE: How many parameters can be passed to a function in...
Hi all I was trying to find the upper limit to as to how many parameters I can pass on to a function I tried it till 700 the compiler (VC++ 6.0) was showing some warnings but no errors. The answer zero is perfectly fine.



Example



int functionCall()



This is a function that takes ZERO parameters.



Regards

Nitin Bhatt

 
Is this answer useful? Yes | No
February 20, 2007 03:58:30   #6  
swetha        

RE: How many parameters can be passed to a function in...

We can pass any no.of parameters.The upperlimit can be found out by knowing the stack size for that function alloted by the operating system.Therefore it is dependent upon the operating system how much stack it is allocating.


 
Is this answer useful? Yes | No
March 29, 2007 08:57:30   #7  
dasam Member Since: March 2007   Contribution: 33    

RE: How many parameters can be passed to a function in...
where do the arguments of a function store?
 
Is this answer useful? Yes | No
December 07, 2008 10:32:11   #8  
burraganesh Member Since: December 2008   Contribution: 20    

RE: How many parameters can be passed to a function in c++ ?
Less than or equal to those mentioned in the prototype.
Less when default arguments are also provided in prototype.

 
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