The Daily CLAD

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

Re: CLAD2017 - Fundamentals - Nested FORs

SercoSteveB
Active Participant

Consider the VI. What are the values of Numeric Value 1 and Numeric Value 2 required to generate the contents of Numeric Array Out shown below?

 

 Nested FORs.png

 

 

Nested FORs Answers.png

 

Nested FORs Answers 2.png

Comments
DougHarper
Member

C

sankar06
Member

Ans C

Happy to Wire
SPK91
Member

C

ArAmM
Member

C

CLD

Baltur
Member

c)

Intaris
Proven Zealot

Terminal for Numeric Value 2 should be outside the outermost loop, otherwise the output could be neither of the proposed answers......

nik35324
Member

C

crossrulz
Knight of NI

C


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
RayFarmer
Trusted Enthusiast

Answer C

Regards
Ray Farmer
பரத்_குமார்(bharathkumar)
Member

c

Thanks & Regards,
Bharath Kumar
GCentral
SercoSteveB
Active Participant

Hi Intaris

 

Cryptic....could you expand?

 

Steve

Intaris
Proven Zealot

If the value of the control "Numeric Value 2" changes between the first and subsequent iterations of the outer loop, any new value of the control can be inferred.  If, after Iteration zero of the outer loop the value of the control would change to 5, the output would be (with a value of "Numeric Value 1" of 3): 0,1,0,1,2,3,4,0,1,2,3,4

 

Due to the fact the control is read multiple times, race conditions are possible assuming it's not run as a sub-VI.  Nit-picking.

Moushick_kiren
Member

c      3,2

jwscs
Active Participant

Num1=3 | Num2=2

 

since only the inner loop appends to the array (in the shift register),

Num2 must be 2 (so 'i' can be 0 and 1).

since we have 3 times of 0,1 in the output array, the outer loop must execute 3 times,

thus Num1 must be 3.


If Tetris has taught me anything, it's errors pile up and accomplishments disappear.
A.Bernau
Member

obviously not A and not D.
The Array is written by the inner Loop so we get the pattern 0, 1, 0, 1, 0, 1 if we have Nummeric value 2 = 2

So answer C

SUYAM
Member

Ans C

Murali_Chennai
Member

Answer is:C C.JPG

Muralidharan Dasarathan
Tsjabrantes
Member

 

Answer C...

Smiley Very Happy

Tarciso Junior
+55 (11) 996-282-103
Skype: Tarciso.junior2
Email: Tsjabrantes@gmail.com
http://br.linkedin.com/pub/tarciso-junior/23/a83/463
GreenLeafSoo
NI Employee (retired)

My answer is C

The 0 and 1 values are responsible by the inner loop (Numeric Value 2) while the repetition of  0 and 1 value is responsible by outer loop (Numeric Value 1).

To obtain 0 and 1 value, 2 iterations are required. Therefore, Numeric Value 2 should be 2.

Meanwhile, to obtain 3 repetitions of 0 and 1 values, 3 iterations are required on the outer loop (Numeric Value 1)

 

Therefore,

Numeric value 1 = 2

Numeric value 2 = 3

Best Regards,
Soo Kin Wah
Application Engineer
National Instrument
Saterneon
Member

The answer is C😇

blink247
Member

answer is C.
If you just look closely all you need is 0 and 1 in the for loop inside so, you only need 2 loops in order to get that. 

second, look at the output, there are 6 cells which requires you to have 3 loops on the bigger for loop 🙂 

WAVE FROM PH

AFox83
Member

C

rak84
Member

c

wayrider
Member

C

abasak86
Member

C.

skian
Member

C

istan0227
Member

C

aaabbc
Member

Prepare the program that creates 4 random integers between 1 and 6 different from each other, saves them in a sequence, and calculates the arithmetic mean of the numbers in the sequence.