Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Which command is more efficient?
*(ptr+1) or ptr[1]

Answer Posted / poornima

If ptr is declared as a pointer like int *ptr; *(ptr+1) is
more efficient.
If ptr is declared as an array like int ptr[20]; ptr[1] is
more efficient.
So, it depends upon how we r declaring ptr as a pointer or
as an array.

Is This Answer Correct ?    1 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does 4d mean in c?

1499


What is 2c dna?

1081


Mention four important string handling functions in c languages .

1109


How does #define work?

1069


please help me..... please codes and flowchart plz turbo c lang po yan.....please asap response... 3. Make an astrology program. The user types in his or her birthday (month, day, and year as integer), and the program responds with the user’s zodiac sign, horoscope, and other information related to it. If the user’s birth year falls into a leap year, your program should display an appropriate message for it. NOTES: Conditional Statements: it should be with graphics

3336


i have to apply for rbi before that i need to know the the syllabus for the entrance questions. whethet it may be aps or techinical

2329


will u please send me the placement papers to my mail???????????????????

1838


Should a function contain a return statement if it does not return a value?

1080


Is there any algorithm to search a string in link list in the minimum time?(please do not suggest the usual method of traversing the link list)

2294


What is a loop?

1044


Why we use stdio h in c?

1036


How can I insert or delete a line (or record) in the middle of a file?

1020


With the help of using classes, write a program to add two numbers.

1042


Explain the advantages and disadvantages of macros.

1103


What is %d called in c?

1232