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 the use of pointers in C?
0 Answers Impetus, Motorola, Tavant Technologies, Virtusa,
why TCS selected more student in the software field from all institution.
What is c programing language?
what is the output of the following program? main() { int c[]={2,8,3,4,4,6,7,5}; int j,*p=c,*q=c; for(j=0;j<5;j++) { printf("%d",*c); ++q; } for(j=0;j<5;j++) { printf("%d",*p); ++p; } }
Write a program for Overriding.
how to introdu5ce my self in serco
Are the expressions * ptr ++ and ++ * ptr same?
what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }
what are the various memory handling mechanisms in C ?
What is the difference between exit() and _exit()?
What is the significance of an algorithm to C programming?
which one is better structure or union?(other than the space occupied )