Question: 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
![Given the declaration: char str1[21]; char str2[21]; a. Write a C++](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f4ef78451ca_11966f4ef77dd490.jpg)
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 str 1 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
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
