Question: 4. Given the declaration: char str1[21]; char str2[21]; a. Write a C++ statement that stores Sunny Day in str1. b. Write a C++ statement that

4. Given the declaration:

char str1[21];

char str2[21];

a. Write a C++ statement that stores "Sunny Day in str1.

b. Write a C++ statement that stores the length of str1 into the int variable

length.

c. Write a C++ statement that copies the value of name into str2.

d. Write C++ code that outputs str1 if str1 is less than or equal to str2, and

otherwise outputs str2.

5. Define a two-dimensional array named temp of three rows and four columns of type int

such that the first row is initialized to 6, 8, 12, 9; the second row is initialized to 17, 5,

10, 6; and the third row is initialized to 14, 13, 16, 20.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!