Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.
exam questions

Exam CLAD All Questions

View all questions & answers for the CLAD exam

Exam CLAD topic 1 question 45 discussion

Actual exam question from NI's CLAD
Question #: 45
Topic #: 1
[All CLAD Questions]

What is the result in Array after the following code has executed?

  • A. A 1-D array of {1, 4, 3, 2, 1, 0}
  • B. A 1-D array of {1, 8, 0, 1, 2, 3, 4, 6, 2}
  • C. A 1-D array of {1, 4, 3, 2, 1, 0, 8, 6, 2}
  • D. A 1-D array of {1, 8, 0, 1, 2, 2, 9}
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
Xlast
4 years, 6 months ago
Could somebody please explain this?
upvoted 1 times
Lui99
4 years, 5 months ago
The array (1,8,6,2) is intial input into INSERT function. Every one loop to the place of index 1 (2nd element) is insert "i" value. All elements are moved to next index. So before first execute the array is (1,8,6,2), "i" is 0 in first execute, so number 0 is insert on index 1 - array will be (1,0,8,6,2). Than i is 1 so (1,1,0,8,6,2) , than 2 (1,2,1,0,8,6,2) etc..
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...