thanks for your reply
yes actually this foo funciton is in another file; which is used as shared library. but purpose of my post is to manipulating the arg char*, in the function foo as i m not allowed to have any return value from function the only thing, that i can do is to pass the arg as a parameter in the function, as i m passing in my function.
Note: I m intending to make a change in the same arg, which should be change after calling of foo function in main.