Possible Duplicate:
In C arrays why is this true? a[5] == 5[a]
Is this instruction correct in c :
5[“abcdef”]
If yes, what does it mean ?
I had this question in a c test.
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.
Yes, it is correct, and means the same as
"abcdef"[5], which evaluates to'f'.It is because
a[b] == *(a+b) == *(b+a) == b[a]by definition.