The Daily CLAD

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

Re: Build Array without Auto-indexing

SercoSteveB
Active Participant

What is the state of Boolean Array Out following execution of the VI?

While Loop - Build Array.png

a)      A 1D array containing {TRUE, TRUE, FALSE, TRUE, FALSE}

b)      A 1D array containing {TRUE, FALSE, TRUE, FALSE, TRUE}

c)       A 1D array containing {FALSE, TRUE, FALSE, TRUE, FALSE}

d)      A 1D array containing {FALSE, FALSE, TRUE, FALSE, TRUE}

Comments
Javed_H
Member

I think C is the correct answer.

ashwinilele
Member

its B (T-F-T-F-T)

RustyStrings
Member

The answer is C

on the first iteration the iteration counter will be 0

the remainder of 0/2 is 0 which is NOT greater that 0

every odd number will have a remainder of 1 which IS greater than 0

ashwinilele
Member

yes u r correct

actually i thought that first iteration value is 1 not 0 .......

i m wrong..............

SercoSteveB
Active Participant

Answer: C

Nice one Javed and RustyStrings.  I think the explanantion from Rusty is more than enough.

RustyStrings
Member

The way I think about the iteration counter, is to relate it to the auto-index

since arrays are 0 based it is convenient to have the iteration counter start with 0

skian
Member

C