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...

two progs are given. one starts counting frm 0 to MAX and
the other stars frm MAX to 0. which one executes fast.

Answer Posted / pritam

this may very well depend upon the architecture of the
underlying hardware.
On most arch though the second one max to 0 will run faster
because almost any sane compiler will optimize the code by
using "not zero" testing machine instruction which is
provided on almost all platforms.

Is This Answer Correct ?    5 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can I manipulate individual bits?

1039


What is the purpose of 'register' keyword in c language?

1022


Why does notstrcat(string, "!");Work?

1135


What is actual argument?

1060


What is the difference between typedef struct and struct?

1106


Explain what is meant by 'bit masking'?

1193


What is #include conio h?

996


What is the use of function overloading in C?

1167


What is a lvalue

1081


Difference between macros and inline functions? Can a function be forced as inline?

1270


find the output? void r(int a[],int c, int n) { if(c>n) { a[c]=a[c]+c; r(a,++c,n); r(a,++c,n); } } int main() { int i,a[5]={0}; r(a,0,5); for(i=0;i<5;i++) printf("\n %d",a[i]); getch(); }

2306


What is the best way of making my program efficient?

1030


How do you use a pointer to a function?

1080


Is sizeof a keyword in c?

965


Can two or more operators such as and be combined in a single line of program code?

1368