GIDForums  

Go Back   GIDForums > Computer Programming Forums > C Programming Language
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 16-May-2005, 14:41
kobi_hikri's Avatar
kobi_hikri kobi_hikri is offline
Regular Member
 
Join Date: Apr 2005
Location: Israel
Posts: 431
kobi_hikri has a spectacular aura aboutkobi_hikri has a spectacular aura about

General questions regarding the language


1. are the next two expressions identical ?
the first is :

a[i][j][k]

and the second is :

*(a[i][j] + k)

After running these two, I got the same value as output.
But, am I missing something ?

2. is it always possible to exit a "for" loop by using the "break" statement ?

Best regards,
Kobi Hikri.
  #2  
Old 16-May-2005, 14:53
Dave Sinkula Dave Sinkula is offline
Member
 
Join Date: Apr 2005
Posts: 199
Dave Sinkula will become famous soon enough
Quote:
Originally Posted by kobi_hikri
1. are the next two expressions identical ?
the first is :

a[i][j][k]

and the second is :

*(a[i][j] + k)

After running these two, I got the same value as output.
But, am I missing something ?
No, they are equivalent.
Quote:
The definition of the subscript operator [] is that E1[E2] is identical to (*((E1)+(E2))).

Quote:
Originally Posted by kobi_hikri
2. is it always possible to exit a "for" loop by using the "break" statement ?
Yes.
Quote:
A break statement terminates execution of the smallest enclosing switch or iteration statement.
 
 

Recent GIDBlogUS Elections and the ?Voter?s Responsibility? by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Favorite programming language? crystalattice C++ Forum 34 06-Dec-2005 19:23
which language ? onauc C++ Forum 2 19-Nov-2004 03:53
A few general questions about security ... Balthazar Apache Web Server Forum 0 11-Jul-2004 11:55
Multi-Lingual Webpages & A Couple General Questions. dwaunthomas Web Design Forum 5 15-May-2004 12:07

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 06:09.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.