I have doubt regarding variable argument list,is there any limitation on the lenght of char string defined as one of argument to variable list.for example
void S
There is no limit imposed by the C language on how long a C string can be (as C strings are basically arrays of char
with a NUL character at the end). As you can see, the type of the argument is char *
, i.e., pointer to char
. This means that the string itself is not passed as an argument, but rather a pointer to its first character—the length of the string is therefore irrelevant for the function call.
(In practice there will of course be a limit from the computer architecture and platform, but these limits are very high compared to typical string arguments.)