Question: Code in C++ Consider a 2-by-3 integer array t. a) Write a declaration for t. b) How many rows does t have? c) How many
Code in C++
Consider a 2-by-3 integer array t.
a) Write a declaration for t.
b) How many rows does t have?
c) How many columns does t have?
d) How many elements does t have?
e) Write the names of all the elements in row 1 of t.
f) Write the names of all the elements in column 2 of t.
g) Write a statement that sets the element of t in the first row and second column to zero.
h) Write a series of statements that initialize each element of t to zero. Do not use a loop.
i) Write a nested for statement that initializes each element of t to zero.
j) Write a statement that inputs the values for the elements of t from the keyboard.
k) Write a series of statements that determine and print the smallest value in array t.
l) Write a statement that displays the elements in row 0 of t.
m) Write a statement that totals the elements in column 3 of t.
n) Write a series of statements that prints the array t in neat, tabular format. List the column subscripts as headings across the top and list the row subscripts at the left of each row.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
