C
chump1708
Is it possible to return two character pointers using a single return
statement or for that matter returning two values using a single return
statement. For example, say if we have a function like -
char* abc() /*Is this function well written??? any problems
*/
{
char def[8]= "chump";
return (char*)def;
}
void main()
{
char *g,h,*i;
g =abc();
h =*g;
i = somefunction(g); /*****WILL THERE BE ANY PROBLEMS IN THIS
LINE*******/
}
Now time to scratch heads...
Is it possible to return a second character pointer to use back from
this function.....i.e. can we change the function abc() to return
another pointer of same character type in one function
call....???????????????????????
Also, is the abc() function well written>????any errors that we can get
under some circumstances?????
statement or for that matter returning two values using a single return
statement. For example, say if we have a function like -
char* abc() /*Is this function well written??? any problems
*/
{
char def[8]= "chump";
return (char*)def;
}
void main()
{
char *g,h,*i;
g =abc();
h =*g;
i = somefunction(g); /*****WILL THERE BE ANY PROBLEMS IN THIS
LINE*******/
}
Now time to scratch heads...
Is it possible to return a second character pointer to use back from
this function.....i.e. can we change the function abc() to return
another pointer of same character type in one function
call....???????????????????????
Also, is the abc() function well written>????any errors that we can get
under some circumstances?????