0

how to pass a string as an argument to a sub fuction and what is the maximum limit of subscripts that the character array can hold as an argument in a function...

2
Contributors
1
Reply
2
Views
11 Years
Discussion Span
Last Post by Ancient Dragon
0

>> how to pass a string as an argument to a sub fuction

The same as you would any other data type

void foo( const char* some_string)
{
 }

int main()
{
     foo("Hello World");

     return 0;
}

>>what is the maximum limit of subscripts that the character array can hold

See limits.h for maximum value of a signed integer.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.