Answer:
5
Explanation:
well the function len gives the length of the list
so the length of supplies is
5
Answer:
You are creating an array "values" which stores 15 integers. And if we will write int[15]=20, we are not following correct syntax. Hence, nothing will happen, and it might however, throw an error that the syntax is wrong.
Explanation:
int[15]=20 is a wrong syntax, and hence nothing will happen or computer might throw an error like that not correct syntax is being used. And if we write values[15]=20, It will certainly throw ArrayIndexOutOfBoundsException as the maximum length is fixed to 15 and values[14] and not more than that.
Answer:
b)void aNonclassFunction (Banana co);
Explanation:
In the function definition you have to pass the tell the function which type of argument it is taking.In our case we are taking a variable co of Banana type passing it to the function named aNonclassFunction having no return type.
So the definition will be like this.
void aNonclassFunction (Banana co);
Explanation:
There are three types of loops in programming languages which are as following:-
- for.
- while.
- do while.
The syntax for all the three loops is different.You will see mostly for loop used with the arrays because they are easy to implement.
the syntax of for loop is :-
for(int i=initial value;condition;i++)
{
body
}
In for loops you only have to write the conditions in only line else is the body of the loop.
for example:-
for array of size 50 printing the each element
for(int i=0;i<50;i++)
{
cout<<arr[i]<<" ";
}
You have to initialize i with 0 and the condition should be i<size of the array and then increase the counter.
Answer:
Explanation:
It is called "Turban"
Sikhs wear the turban, to take care of the hair, promote equality, and preserve the Sikh identity