With arrays why is it the case that a 5 5 a

0 votes
This property of arrays in C is mentioned in the K & R programming language, as Joel notes in Stack Overflow podcast number 34: a[5] == 5[a]

Joel claims that pointer arithmetic is the cause, but I'm still confused. Why is a[5] equal to 5[a]?
Nov 17 in C# by Ashwini
• 2,760 points
18 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In C#

0 votes
1 answer

What is the difference between a field and a property

The internal workings of a class should ...READ MORE

answered Jun 21 in C# by jyoti
• 1,240 points
47 views
0 votes
1 answer

What does the extension method do in c# and why do you need it

Extension Methods allow you to add additional ...READ MORE

answered Jun 21 in C# by krishna
• 2,820 points
74 views
0 votes
0 answers

How to add a gridview to a C# winforms project with a list of objects as the datasource

In Visual Studio 2015 community, I'm creating ...READ MORE

Jun 11 in C# by krishna
• 2,820 points
59 views
0 votes
1 answer

What is the best C# to VB.net converter

Telerik has a solid SharpDevelop-based converter that ...READ MORE

answered May 30 in C# by rajiv
• 1,620 points
463 views
0 votes
1 answer

What is the difference between C# and .NET?

C# is a programming language, and.NET refers ...READ MORE

answered Jun 7 in C# by pranav
• 2,580 points
75 views
0 votes
1 answer
0 votes
0 answers

Simple C++ swap function

Why is it that if I have a method like this to swap two numbers, it doesn't work[swap], (I know I can accomplish this by defining pointers in the prototype and then passing the addresses of the relevant variables in main()), yet it works for arrays without having to supply pointers and addresses? It does not work. void num_exchange(int m, int n); int main(){ int num1 ...READ MORE

Jul 27 in C++ by Nicholas
• 7,120 points
61 views
0 votes
1 answer

Passing a 2D array to a C++ function

There are three ways to pass a ...READ MORE

answered Aug 2 in C++ by Damon
• 4,960 points
369 views
0 votes
1 answer

How do I create an array of pointers?

Student** db = new Student*[5]; // To allocate ...READ MORE

answered Aug 5 in C++ by Damon
• 4,960 points
139 views
0 votes
0 answers
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP