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 |
what is a far pointer
12 Answers ABB, DRDO, ITI, Maruti Suzuki, Steel Plant, TCS, Toyota, Vivo Mobiles,
How will you allocate memory to double a pointer?
Explain the difference between null pointer and void pointer.
what is diff b/w huge & far & near pointer??
how to write optimum code to divide a 50 digit number with a 25 digit number??
Write a code to remove duplicates in a string.
Explain how can I manipulate strings of multibyte characters?
I have one doubt. What does below statement mean? #define sizeof(operator) where operator can be int or float etc. Does this statement meaningful and where it can be used?
What are the concepts introduced in OOPs?
How can I generate floating-point random numbers?
Differentiate between a structure and a union.
How do you prevent buffer overflows in C?