Question: Consider the following array definitions: char str1[20]; char str2[15] = Fruit Juice: Identify whether the following are valid or invalid: 1. str 1 = Fruit
Consider the following array definitions: char str1[20]; char str2[15] = "Fruit Juice": Identify whether the following are valid or invalid: 1. str 1 = "Fruit Juice": 2. strcpy(str 1, str2); 3. if (strcmp(str1, str2) == 0) cout = strlen(str2)) str 1 = str2: 5. if (str 1 > str2) cout str2"
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
