Hi Nikhil,
Seems that you got the solution by hit and trial. But do you understand the meaning of the code given below. If not, understand it , it may help you in understanding pointers to a great extent.
ciao tapesh
--- Nikhil Joshi nikhiljoshi@subdimension.com wrote:
Hi! success afterall ... I used following to allocate memory to arg
for (i=1;i<4;i++) if ((arg[i] = (char *) malloc (30)) == NULL) { printf ("Error allocating memory"); exit(1); }
iz there ny other method to allocate memory to array of pointers?
__________________________________________________ Do you Yahoo!? New DSL Internet Access from SBC & Yahoo! http://sbc.yahoo.com