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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started