Answer:
#include <iostream>
#include <stdlib.h>
#include <time.h>
using namespace std;
// array fill and returnig array to the main()
float *arrayFill(float *arr) {
// srand() allows generate new random value everytime the program runs
srand(time(NULL));
for (int i = 0; i < 10; i++)
{
// array fill with random number between 0 to 100
arr[i] = (rand() % 100);
}
return arr;
}
// print array
void print(float* arr) {
cout << "Array: ";
for (int i = 0; i < 10; i++)
{
cout << arr[i] << " ";
}
}
float maxNum(float* arr) {
float temp = arr[0];
for (int i = 1; i < 10; i++) {
if (temp < arr[i]) {
temp = arr[i];
}
}
return temp;
}
int main() {
// creating dynamic array of elements 10 in heap memory
float *arrPtr = new float[10];
float result = 0;
// calling arrayFill()
arrPtr = arrayFill(arrPtr);
// calling print() to print array
print(arrPtr);
// calling maxNum() to find maximum number in the array
result = maxNum(arrPtr);
cout << "\nmaximum number: " << result;
delete[] arrPtr;
return 0;
}
Explanation:
please read inline comments inside the code section:)
Answer:
The central point of Christian belief is that God, the Father, entered into human history as the Son, Jesus of Nazareth, and arose as the Holy Spirit. Christian Philosophy God is the Creator of the universe.
Explanation:
Answer:
The answer to the give question as follows:
1) \n
2) \t
3) \'
4) \"
5) \\
Explanation:
The description of the above symbols as follows:
- The \n is used to provide the new line spacing.
- The \t is used to provide a tab space.
- To assign a single character value we use \' single.
- The double \" quote is used to assign a string value.
- The backslash is used to provide the character of the escape and it also used in a file path.