--- In [email protected], satya dev <[EMAIL PROTECTED]> wrote: > > The purpose of the code is to return array of strings variable > to main I am giving input 3 strings in function call() > these strings are stored in a variable "str" > then that is returned to main, I want to print them in main.. > if i give input as > --------------------------- > aaa > bbb > ccc > ------------------------------ > output is > ------------------------ > aaa > garbage value > garbage value <snip>
Typical mistake. You have declared "name" as a char[][] which is correct (a 2D array of characters). However, you have the function "call()" return a char*. This is wrong. As you want to set up an array, change "call()" to return a char** and make sure it accepts a "char**" as its parameter as well. Regards, Nico
