Which keyword or symbol is placed in a function prototype and definition to prevent the function from changing a passed array?
A. &
B. *
C. fixed
D. const
Observe the function prototype below:
void printSomething(int[]);
Based on the parameter, what is this function expecting?
A. A single element of an array
B. An array address ("pass by reference")
C. An entire array ("pass by value")
D. The size of an array
By using the same ___, you can build relationships between data stored in two or more "parallel" arrays.
A. data type
B. name
C. subscript
D. function
This program will draw a playing field where the user decides the location of the Hero.
Enter the row # of the hero: [user types: 1]
Enter the column # of the hero: [user types: 3]
--H---------
-------------
-------------
-------------
-------------
Explain how overloading a unary operator is almost similar to overloading a binary operator with necessary examples and include main() function to demonstrate. Mention the differences between these two in terms of number of operands they deal with.
Create a program that countsand displaysthe odd and even numbers among the ten(10)input values.Array Requirements:Use 3separate arraysforteninput values, evenand odd num
Create
a
program that will count and display the odd and even numbers among the
ten(10)
input
values
using a two
dimensional array.
Using the following chart
Sales
Commission
ratio
10%
15%
Less than 10000$
Greater than or equal
10000$ and less than
15000$
Greater than or equal 15000$
20%
Commission = sale * commission ratio
Sample Run:
enter the amount of your sales:
your commission is 1912.5
#include <iostream.h>
void main()
{
double temperature;
cout<<”Input Temperature :”;
cin>>temperature;
if (temperature>=80)
{cout<<”go swimming”;}
else if (temperature>=50)
{cout<<”go running”;}
else
{cout<<”stay inside”;}
}