The Daily CLAD

Community Browser
cancel
Showing results for 
Search instead for 
Did you mean: 

Re: For Loop Iteration & Multiplication

SercoSteveB
Active Participant

What is the value of Numeric Value Out following execution of the VI?

For Loop Multiplication.png

a) 3

b) 4

c) 6

d) 24

Comments
adambro
Member

I will say 3. Since a shift register isn't used, only the constant value of 1 will be fed into the loop on each iteration. Since auto-indexing is enabled on the array input, the loop will iterate three times, rather than four. The numeric output will only disply the result of the final iteration. At that point, i will equal 2 and so the output will be 1x(2+1).


ahmelsayed
Member

as Indexing is Disabled, the indicator will display the last iteration to be 1*(3+1) = 4

Mantesh
Member

Answer is: a) 3

ManjuG
Member

It will iterates 3 times so 1*(2+1)=3, so the ANS is a) 3.

StefanoFacchine
Member

Hi everyone,

I do agree with the nice explanation given by Adam_B, the correct answer is a).

ahmelsayed
Member

Ok this constatnt cheated me ! it will output only 3 as only 3 iteration will be executed

mini09
Active Participant

Well friends accecpet with those who all go for 3..

@ steve: were have you been I missed a lot of CLAD questions were u busy?

SercoSteveB
Active Participant

Answer: A.  Nice one adambro, mahantesh, ManjuG, StefanoFacchinetti, Ahmed Elsayed & gnshmrthy.

Nice explanantion adambro, nothing more to say.

ashwinilele
Member

Ans is 3

ramesh44
Member

3

rupesh.v
Member

Ans :a

because for loop always take lower value N  ...its always lazy..Smiley Wink

skian
Member

A