execvp second argument question
Hi,
If I have a an array of string (**char args), but the size of the
array is, lets say, 10, whilst the arguments are 2. If I set the third
index (index no 2) to '\0', will this work for the following?
In other words, the size of the array is larger than the number of
elements in the array (and I set the last element to '\0')
int rval;
rval = execvp(myCommand, args);
Thanks,
Alij
.
Relevant Pages
- Re: is there an alternative to strstr
... >> To exploit this fact, you need a different data format, a plain string is ... > Ok I have put the email ids in a sorted array. ... However you can use an array of char pointers and use ... int cmp(const void *v1, const void *v2); ... (comp.lang.c) - Re: Pointers on string members of structure
... because this just points memstr to a fixed string and it is undefined to ... char memstrA; ... string array directly like this and how? ... struct or if the struct member points to the array. ... (microsoft.public.vc.language) - Re: copy a string into a 2d array of chars
... This split function should allocate a 2D array of chars ... >focus the program the string is not actually split. ... later) is an array of char containing the original contents of the ... The i-th pointer will contain the starting address of the ... (comp.lang.c) - Re: wsprintf does not work
... char array; ... If i dont use memset then each index in array will contain garbage value. ... The array is going to contain a NUL-terminated string, ... The documentation of sprintf says so, ... (microsoft.public.vc.mfc) - Re: K&R2, exercise 5.4
... int strend(char*, char*); ... Now ps points to the first character of a string which is one character ... * don't want to FAKE the array call ... outer for loop checks for each element of 1st array. ... (comp.lang.c) |
|