C

Array Indexing in C

I found this interesting thing about array indexing in C somewhere in the web:
Suppose that “a” is an array. Then, a[5] and 5[a] are quivallent. Both are interpreted as *(5 + a) or *(a + 5) which is the same :)
Also: “Hello World”[3] and 3["Hello World"] are the same. Try and C ;)

Post to Twitter Post to Delicious Post to Digg Post to Facebook Post to Reddit Post to StumbleUpon

Tags: ,

Wednesday, January 6th, 2010 Programming 1 Comment
my email
my photo
Hi,
My name is Amir Watad. I have a BSc. in biomedical engineering from The Biomedical Engineering school , Technion , Israel, and a BSc. in electrical engineering from The Electrical Engineering school , Technion , Israel.
I'm a Verification Engineer in Mellanox Technologies Ltd.
I love Linux, the Command Line and the OpenSource Community.
I used to write Poems (Arabic) when I was able to find time for this.
February 2012
S M T W T F S
« Sep    
 1234
567891011
12131415161718
19202122232425
26272829  
SEO Powered by Platinum SEO from Techblissonline

Twitter links powered by Tweet This v1.7.4, a WordPress plugin for Twitter.