what is the difference between the below declarations?
char *argv[];
and
char *(argv[]);
I think it is same according to spiral rule.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As written, the parentheses make no difference.
The so-called spiral rule falls out of this simple fact of C grammar: postfix operators such as
()and[]have higher precedence than unary operators like*, so expressions like*f()and*a[]are parsed as*(f())and*(a[]).So given a relatively complex expression like
it parses as