08-28-2021 08:36 AM - edited 08-28-2021 08:38 AM
HI
can you help me in this program as the loop exits before completing iterations
it stops after i enter the 8th value
08-28-2021 08:47 AM - edited 08-28-2021 08:50 AM
1. You are defining an array before you even know what the size should be. This can cause all kinds of memory issues (accessing data that was allocated for something else while writing to your array).
2. I'm left to assume you input 8 for the size.
08-28-2021 08:50 AM - edited 08-28-2021 08:54 AM
I moved the post to the LabWindows CVI forum, since it has nothing to do with LabVIEW.
There is a bad condition in your C program. You use the unitialized "size" variable to do a static array allocation in line #9. then you read in the size variable from the user.
And even if you move the
int arr[size];
after the call to read in the size variable it will not compile in all C compilers properly since they often do static memory allocations for such declarations and will not even compile the code.
And to top that all off, a pretty nonsensical post to a completely irrelevant board by a 1 hit wonder user. If there would be as much as the hint of a spam link in the post, I would have flagged it as spam instead.