Search the courses, subjects, tracks, games and features, or jump straight to a page.
4 cards from this section. Quick, good the night before a test.
What is the index of the first element in a one-dimensional array?
Remember that indexing usually starts from zero.
How many elements does this array 'int arr[10];' hold?
The number inside the brackets tells you the size.
What does an array store?
Think about how arrays are defined.
An index of an array starts from what number?
Recall how array indices are structured.
Create a C++ program that accepts 5 integers from the user, stores them in an array, and then calculates and displays their average.
Don't forget to initialize the sum and divide by the count after summation.
Write a function that takes a two-dimensional array of size 3x3, computes its transpose, and prints it.
Remember that the transpose of a matrix 'flips' it over its diagonal.
6 more questions in this section. Enroll free to practise them all.
Enroll free