| Forums.Sureshkumar.net : A Perfect Place to Share Knowledge Blogs Games Magazines |
|
|
|||||||
| C C Interview Questions asked in various Interviews. Professionals are invited to share Answers for these C Interview Questions. C Interview Questions with answers, Experiences, Career Advices, Tips and more. |
![]() |
|
|
LinkBack | Thread Tools | Rate Thread | Display Modes |
|
|
#3 (permalink) |
|
Junior Member
Join Date: Oct 2008
Age: 24
Posts: 14
Thanks: 2 Thanked 0 Times in 0 Posts Thanks: 2
Thanked 0 Times in 0 Posts
Rep Power: 1
|
Re: Are pointers really faster than
It is "usually" faster to march through large arrays with pointers rather than array subscripts, but for some processors the reverse is true.
Function calls, though obviously incrementally slower than in-line code, contribute so much to modularity and code clarity that there is rarely good reason to avoid them. Before rearranging expressions such as i = i + 1, remember that you are dealing with a C compiler, not a keystroke-programmable calculator. Any decent compiler will generate identical code for ++i, i += 1, and i = i + 1. The reasons for using ++i or i += 1 over i = i + 1 have to do with style, not efficiency. |
|
|
|
![]() |
| Tags |
| c language , interview questions |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What happens to the member pointers when | ShivaniX | C Plus Plus | 0 | 12-06-08 12:55 PM |
| what is pointers | ShivaniX | C | 0 | 11-06-08 08:28 PM |
| Which of the above methods is the faster method | sandeepkumar141 | Oracle General | 0 | 04-06-08 12:30 PM |
| To what value are pointers initialized | ShivaniX | C | 0 | 25-05-08 04:36 AM |
| Features Removed from C and C++ | TAM | JAVA Technologies | 1 | 27-09-07 06:35 PM |