Set the value of the fourth component of the array alpha


A)  Write C++ statements to do the following:
1.    Declare an array alpha of 15 components of the type int.
2.    Output the value of the tenth component of the array alpha.
3.   Set the value of the fifth component of the array alpha to 35.
4.   Set the value of the fourth component of the array alpha to three times the value of the eight component minus 57.
5.   Output alpha so that five components per line are printed.
Please see attachment for full question.

A) Write C++ statements to do the following:
Declare an array alpha of 15 components of the type int.
2. Output the value of the tenth component of the array alpha.
3. Set the value of the fifth component of the array alpha to 35.
4. Set the value of the fourth component of the array alpha to three
times the value of the eight component minus 57.
5. Output alpha so that five components per line are printed.
B) Suppose list is an array of five components of the type int. What
is stored in list after the following C++ code executes?
for (i = 0; i 

{
list[i] = 2 * i + 5;
if (i % 2 == 0)
list[i] = list[i] â?" 3;
}
C) Given the declaration:
char str1[15];
char str2[15] = â??Good dayâ?;
mark the following statements as valid or invalid. If a statement is
invalid, explain why.
1. str1 = str2;
2. if (str1 == str2)
cout 

3. if (strlen(str1) >= strlen(str2))
str1 = str2;
4. if (strcmp(str1, str2) 

cout  

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Set the value of the fourth component of the array alpha
Reference No:- TGS0143248

Expected delivery within 24 Hours