Question: THe ? mark in the following code should be replaced by ___________. char s[80] = abc 123 aABC; int count = 0; for (int i
THe ? mark in the following code should be replaced by ___________. char s[80] = "abc 123 aABC"; int count = 0; for (int i = 0; i < ?; i++) { if (isalpha(s[i])) count++; } cout << "The number of letters in s is " << count << endl;
80
strelen(s)-1
79
strelen(s)
What is the output of the following code? double myList[] = {1, 5, 5, 5, 5, 1}; double max = myList[0]; int indexOfMax = 0; for (int i = 1; i < 6; i++) { if (myList[i] > max) { max = myList[i]; indexOfMax = i; } } cout << indexOfMax << endl;
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
