Question: 8. The following code is intended to process a string and count the number of letters of the alphabet, the number of digits, the number

 8. The following code is intended to process a string and
count the number of letters of the alphabet, the number of digits,

8. The following code is intended to process a string and count the number of letters of the alphabet, the number of digits, the number of punctuation characters, the number of digits, and the number of spaces/other characters. Does it correctly do that? (Don't consider any accidental typos that I may have made.) int main() int numAlpha, numDigits-0, numPuncts, numOthers 0; string sent: //a string to hold the user's sentence getlinecin,sent): for (int) 0;}/or cout=70): A. Approximately 30% B. Approximately 70% C. Neither, there is something wrong with this code. 11. The following code can be used to simulate the throw of a single die that has face values of 1 through 6. int die = ((rand() % 6); A True B. False 12. Suppose we need to generate random numbers between 100 and +80. We can do that with which of the following codes? A inn (rand() % 180) - 99, B. inn (rand() % 181) - 100; C. Neither, they both have logic errors. 13. The do, while loop A. Always executes the statements within its scope at least once B. Tests the looping condition at the bottom of the loop C Both A and B 14. What will be in the variable fullname if i enter "George Washington" at the prompt? char fullname[30]: cout > fullname: A. George B. George Washington C. Washington D. Cannot be determined from the code segment shown 15. You can use the break statement to exit an infinite loop, or one that has no other way of terminating A True 8. False 16. The following code will print "Abraham" on one line, then two blank lines, and then "Lincoln cout

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!