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 do the 'c' and 'v' in argc and argv stand for?
"C" language developed by "Dennis Ritchie" at AT & T. his remarks are a) too general, too abstract b) could deal with only specific problems c) lost generality of BCPL and B restored d) no remarks
Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor
parkside's triangle.. create a program like this.. enter the size: 6 enter the seed: 1 output: 1 23 456 7891 23456 789123 sample2: enter the size: 5 enter the seed: 3 output: 3 45 678 9123 45678 parkside should not exceed 10 while its seed should only be not more than 9..
AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?
difference between semaphores and mutex?
To find whether a number is even or odd without using any conditional operator??
12 Answers College School Exams Tests, IBM,
What is %s and %d in c?
What is getch () for?
WHOT IS CHAR?
How can I recover the file name given an open stream?
Explain this code. #include <stdio.h> void f1(int *k) { *k = *k + 10; } main ( ){ int i; i = 0; printf (" The value of i before call %d \n", i); f1 (&i); printf (" The value of i after call %d \n", i); }