Articles to prepare
- 10Number of questions
- 314Test passed (times)
- 257Users who passed the test
- 62.771Average score
- --Your average score

C++ → C++ - Tutorial 005. Pointers, Arrays and Loops
An array of elements of type char can be declared like this:
char v[6]; // array of 6 characters
Similarly, a pointer can be declared like this:
char* p; // pointer to character
In declarations, [] means ‘‘array of’’ and *means ‘‘pointer to.’’ All arrays have0as their lower bound, so v has six elements, v[0] to v[5] . The size of an array must be a constant expression. A pointer variable can hold the address of an object of the appropriate type:
char∗ p = &v[3]; // p указывает на четвёртый элемент массива v char x = ∗p; // *p является объектом, на который указывает p
In an expression, prefix unary ∗ means ‘‘contents of’’ and prefix unary & means ‘‘address of.’’ We can represent the result of that initialized definition graphically:


Ruby → User Guide #06 - Ruby - arrays
arrays, Ruby, ruby lesson, ruby уроки, user guide, массивы, руководство пользователя
You can create an array by listing some items within square brackets ([]) and separating them with commas. Ruby's arrays can accomodate diverse object types.
ruby> ary = [1, 2, "3"] [1, 2, "3"]
Arrays can be concatenated or repeated just as strings can.
ruby> ary + ["foo", "bar"] [1, 2, "3", "foo", "bar"] ruby> ary * 2 [1, 2, "3", 1, 2, "3"]
Timeweb
Let me recommend you the excellent hosting on which EVILEG is located.
For many years, Timeweb has been proving his stability.
For projects on Django I recommend VDS hosting
View Hosting