Write a function to concatenate two strings. (Don’t use predefined functions)
Char* strcat(char *dest,const char *source);
Write a function to merge two sorted arrays and return a new sorted array.
int* merge(int* A, int n1, int* B, int n2) {
}
A : Integer array, n1 : Integer array's ( A ) length
B : Integer array,n2 : Integer array's ( B ) length
Returns a array of size n1 + n2 with A and B merged.
Write a function that finds out length of a string? (Don’t use predefined functions)
Int str_len(char*);
Write a function to find the sum of array elements.
Int sum(int *);
Illustrate the use of pointers in swapping two numbers.
Write 2 swap functions, for swapping two integers.
void swap(int,int);
void swap(int*,int*);
1. Write a C++ statement that updates the value of newNum variable by adding the value of the named variable SECRET (assign any value to this variable). Then, write a C++ statement that outputs the value of newNum with an appropriate message.
TotalValue (value ), value2) //returns total of the 2 values
Write a function using C+* statements called Toto/P/oduction) which takes five integer artay's (amay), arrayz
array3, array4, arrayS) and an integer as the size of the arroyd as parameters. The arrayi to array4 Hold
quantity of the four (4) outlets over A days The funstion cakulates the total of each day using the
Tota/Value (value 1, value2) function and store in the array
Create a program that will Ask a user to enter a number. If the number is between 0 and 4, write the word blue. If the number is between 5 and 10, write the word red. if the number is between 11 and 14, write the word green. If it is any other number, write that it is not a correct color option.if else statement
Create a program that will Ask a user to enter a number. If the number is between 0 and 4, write the word blue. If the number is between 5 and 10, write the word red. if the number is between 11 and 14, write the word green. If it is any other number, write that it is not a correct color option.If else statement in C++
Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMiles.
Ex: If the input is:
-10 20 30 40
the output is:
Min miles: -10
Max miles: 40#include <iostream>
using namespace std;
int main() {
const int NUM_ROWS = 2;
const int NUM_COLS = 2;
int milesTracker[NUM_ROWS][NUM_COLS];
int i;
int j;
int maxMiles = 0; // Assign with first element in milesTracker before loop
int minMiles = 0; // Assign with first element in milesTracker before loop
int value;
for (i = 0; i < NUM_ROWS; i++){
for (j = 0; j < NUM_COLS; j++){
cin >> value;
milesTracker[i][j] = value;
}
}
/* Your solution goes here */
cout << "Min miles: " << minMiles << endl;
cout << "Max miles: " << maxMiles << endl;
return 0;
}