limit on number of parameters to a C function

  • Thread starter 144.16.64.4 [shishir]
  • Start date
1

144.16.64.4 [shishir]

what is the upper limit on the number of parameters to a function in C ?
what is the mechanism by which parameters are passed in C, for instance thru registers or stack.Obviously both are limited.

==================================
Poster's IP address: 144.16.64.4
Posted via http://nodevice.com
Linux Programmer's Site
 
E

Eric Amick

what is the upper limit on the number of parameters to a function in C ?

It's implementation-dependent. The Standard requires the limit to be at
least 127.
what is the mechanism by which parameters are passed in C, for instance thru registers or stack.Obviously both are limited.

The behavior of parameter passing must conform to the Standard's
description, but the implementation is unspecified.
 
D

Dan Pop

what is the mechanism by which parameters are passed in C,

The standard doesn't tell us.
for instance thru registers or stack.Obviously both are limited.

No problem: the caller might write them on the disk and the callee might
read them from the disk. The standard certainly allows such an
implementation.

Dan :)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top