The Daily CLAD

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

Re: Iterating through a string

SercoSteveB
Active Participant

What is Numeric Value Out following execution of the VI?

 

Searching Strings.png

 

a) 0

b) 1

c) 2

d) Undefined (the VI does not stop)

Comments
sankar06
Member

Ans.: C

Happy to Wire
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
MrStevenUND
Member

C

ersmt444
Member

C

SercoSteveB
Active Participant

Answer: C.  Nice one all.

 

This one looks at each character in the string individually and increments the numeric shift register value by one each time a white space character is detected.

keshavboss
Member

Untitled.png


@SercoSteveB wrote:

What is Numeric Value Out following execution of the VI?

 

Searching Strings.png

 

a) 0

b) 1

c) 2

d) Undefined (the VI does not stop)


I got Answer D. i run same vi in labview 2017 as in question. why?

crossrulz
Knight of NI

Get rid of the wait and turn off highlight execution.  You might just not be waiting long enough.


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
keshavboss
Member

It is just for my understanding. i have run program without it before, but i got same answer (D)..

crossrulz
Knight of NI

Can you post an actual snippet?  Just from the image, I don't see anything wrong.  But maybe there is something hidden?


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
keshavboss
Member

iterating through string.png

crossrulz
Knight of NI

Your snippet ran just fine for me.  Are you pressing the Run Continuous (circular arrows) instead of the Run (single arrow) button?


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
keshavboss
Member

Now it works fine for me too, i still can't find why its not working earlier... thanks for your quick replies...

levonsg
Member

C

https://images.youracclaim.com/size/340x340/images/2edb5b1a-9414-44e1-8519-c774fc6dd079/36015_Certificate_Badges_FINAL__1__NI_Instructor_v5.png