two progs are given. one starts counting frm 0 to MAX and
the other stars frm MAX to 0. which one executes fast.
Answers were Sorted based on User's Feedback
Answer / 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 |
Answer / nagel
what you have given for this is wrong there is some formula
Is This Answer Correct ? | 0 Yes | 0 No |
Answer / vignesh1988i
as for as i think , counting of MAX to 0 only will be done
fast..... take an real time example : when we climb up any
thing (eg : steps) it will take time for us to reach the
place which is up , wheares when we come down using steps we
feel easier and come quickly . like this if we see the
above can be the answer..................
thank u
Is This Answer Correct ? | 0 Yes | 0 No |
Give a one-line C expression to test whether a number is a power of 2. [No loops allowed - it's a simple test.]
What is include directive in c?
Write a program to input the price of 1 burger and the number of burgers eaten by a group of friends .print the total amount to be paid by the group?
can we initialize all the members of union?
how to find string length wihtout using c function?
Write a program in C to convert date displayed in gregorian to julian date
who invented c
The difference between printf and fprintf is ?
Explain Basic concepts of C language?
How can I make sure that my program is the only one accessing a file?
how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions
Are enumerations really portable?