Task | Comment | Grade |
---|---|---|
1) Declare an array of any type: explain how to use an array, how to access array elements.Assign values to some of its elements, and use those values display) What are the advantages of an array over ordinary variables | Oh! text lines are special arrays, a special topic | 1.5/1.5 |
2) What is **the name** of the array? What will happen if you display this value on the screen? What does `cout<<a+2;`that mean (cout<<a-2;)? If `cout<<a;` displays 4,000, then how much will it be`a+1?` | Yes. but expressions a+2, a-2 they do not change the pointer `a`, they "generate"/calculate a new address | 1.3/1.5 |
3) Can an array have two dimensions? | 1/1 | |
4) Write a random number in the variable k. `int k=(rand()%101) * (rand()%101) * (rand()%101)+500;` Try to solve the task of finding divisors from the last lesson more efficiently (so that the divisors are found faster) and write the results (not on the screen) but in an array. _Since the transfer of arrays to a function is not a simple topic - filling the array should not be done in the form of a function!!!_ | This is the most interesting task from this lesson, but you described it very briefly, the main thing was to explain why - we perform the cycle until sqrt(n) and not until n. and it would also be nice to arrange the received values, not to sort, but to order. | 1/2 |
5) Fill the array with 55 numbers with random numbers from 10 to 50. If there is a number 37 among the elements of the array, print it `yes`, and if there is no such number, print it `no` | Not every beginner guesses to use a logical variable, but whether it will be possible to solve the problem without it)) | 1/1 |
6) Fill an array of 66 numbers with random numbers from 12 to 60. Replace even elements with 7 and odd elements with 77 | It is necessary to display not only the result, but also the input data (generated array) | 0.8/1 |
7) Fill the array of 77 numbers with random numbers from 102 to 707. Find the two largest numbers. But the phrase "the two largest numbers" can have many interpretations. Therefore, first explain well how this phrase was understood. And then solve the problem. | lines 14 and 15 are absolutely correct, only elements from the array can be taken as candidates for the maximum, so that no `0` or `-1` end up in me | 2/2 |
Total: | 8.6/10 |
RE: SLC21 Week2 - Programming Arrays
You are viewing a single comment's thread from:
SLC21 Week2 - Programming Arrays
Dear @sergeyk,
Thank you very much for the evaluation. I'm really glad to have positive comments from you for this post actually as I had to spend lot of time for this articles as it was truly a learning process.
Thank you.
-Vimukthi
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit