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



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

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

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

Answer / sriharsha karanth

Both Will Execute Fast

Is This Answer Correct ?    1 Yes 0 No

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

Answer / nagel

what you have given for this is wrong there is some formula

Is This Answer Correct ?    0 Yes 0 No

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

Answer / venkatesh

depends on program

Is This Answer Correct ?    0 Yes 0 No

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

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

Post New Answer

More C Interview Questions

what do the 'c' and 'v' in argc and argv stand for?

0 Answers   TISL,


"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

0 Answers  


Write a program to generate a pulse width frequency of your choise,which can be variable by using the digital port of your processor

0 Answers   TATA, TCS,


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

4 Answers  


AMMONG THE 4 STROAGE CLASSES IN C, WHICH ONE FASTEST?

13 Answers   HCL,






difference between semaphores and mutex?

1 Answers  


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?

0 Answers  


What is getch () for?

0 Answers  


WHOT IS CHAR?

4 Answers   TCS,


How can I recover the file name given an open stream?

0 Answers  


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); }

3 Answers   IBM,


Categories