Answer:
Option a: a sorted array
Explanation:
Since the expectation on the data structure never need to add or delete items, a sorted array is the most desirable option. An array is known for its difficulty to modify the size (either by adding item or removing item). However, this disadvantage would no longer be a concern for this task. This is also the reason, linked list, binary search tree and queue is not a better option here although they offer much greater efficiency to add and remove item from collection.
On another hand, any existing items from the sorted array can be easily retrieved using address indexing and therefore the data query process can be very fast and efficient.
Answer:
for (char outerChar='a'; outerChar<='e'; outerChar++){
for (char innerChar='a'; innerChar<='e'; innerChar++){
cout << outerChar << innerChar << "\n";
}
}
Answer:
- <em>Their country can support </em><u><em> 128 </em></u><em>unique license plates</em>
Explanation:
Since there is space for<em> 7 digits </em>on each <em>license plate</em>, the first plate starts at <em>0000000 </em>(seven 0).
<em>Binary numbers</em> contain only the digits 0 and 1.
Thus, there are only two possibilities for each digit.
Using the multiplication counting principle, the number of total different binary numbers, with seven digits is 2 multiplied seven times:
- 2 × 2 × 2 × 2 × 2 × 2 × 2 = 2⁷ = 128 ← answer
Answer:
Following are the program in Python langauge
person_name = input() # Read the person name by the user
person_age=0 #declared a vaiable person_age
person_age = int(input()) # read person_age by the user
person_age=person_age+5 # add 5 to person_age
print('In 5 years',person_name,'will be',person_age) # display the output
Output:
Amy
4
In 5 years Amy will be 9
Explanation :
Following is the description of code:
- Read the value of the "person_name" variable by the user by using the input function.
- Declared a variable person_age and initialized 0 with them.
- Read the value of "person_age" variable by user by using input function and convert into int by using int function
- Add 5 to "person_age" variable and store again them into the "person_age" variable.
- Finally, display the output which is mention in the question.