AFAIK this is what you intend:
struct stu
{
char **argv; // *argv[] will give you "error: flexible array member not at end of struct"
int a;
};
struct stu Stu; // Allocate Stu as a global stu struct
fun(int argc, char * argv[]) {}
int main()
{
char input[128];
char *argies[2]; // Static allocation of space for argv to point to
struct stu *ptr = &Stu;
ptr->argv = argies; // You need to assign argv to point to allocated space
ptr->argv[0] = "name";
ptr->argv[1] = input;
fun(2, ptr->argv); // is 2nd argument we passing member of array argv??
}
If you do not declare an actual stu struct, then ptr wiill be initialized to zero. Also if you do declare a static struct stu (Stu above) but do not initialize the argv pointer, the argv pointer will be initialized to zero. Not pointing to "who knows where" but pointing to a very specific place.
Note that input is not NULL terminated, in fact it is not initialized, so the variable name "argv" might be misleading because most programmers might assume that any char **argv holds NULL terminated C strings. Also, you probably want to dimension argies to 3 and put a NULL in the third position.
You can pass ptr->argv[0] (the string "name") as *(ptr->argv), but the fun prototype would have to be fun(int argc, char * argv).
**ptr->argv is a char.
*ptr is a struct stu.
**ptr is an error.