I have to correct an existing C file which has a bunch of format specifiers compilation errors.
Can anyone tell the correct format specifiers for the following cases:
-
u_char(*) [10](I tried %s, but didn’t work) -
char(*) [10](I tried %s and %c, but didn’t work)
Thanks.
Both are pointers to arrays, so you can dereference them to become arrays, which decay to pointers-to-first-element:
To spell it out: the type of
paischar(*)[10], and the type of*paischar[10], and the latter decays to achar*of value&((*pa)[0])(equal to&(arr[0])).