subject
Computers and Technology, 05.05.2020 19:29 npatony

Write a function called countstuff () that takes as a parameter a character array, and returns an int. The prototype must be:
int countstuff (char s[]);
The array passed will be less than 1000 characters long. Your code should return a value indicating the number of uppercase characters, the number of lowercase characters, and the number of digits in the string. The number of uppercase characters should be returned in the millions places, the number of lowercase in the thousands places, and the number of digits in the units places (i. e. UUULLLDDD).

x=countstuff ("Space the final FRONTIER"); // x= 9012000
x=countstuff ("THERE ARE 4 LIGHTS"); // x=14000001
x=countstuff ("Send $1000 to Your Favorite ChArItY!!!"); // x=13012004

To force values into the millions, thousands, or units places, you can do something like
V = cntUp*1000000 + cntlow* 1000 + cntDigits

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 20:30
What important technology has done the most to allow a businesses a chance to compete with larger international companies
Answers: 1
question
Computers and Technology, 22.06.2019 06:00
Write a function that draws a pool ball. this function should take as parameters, the color, the number that should go on the pool ball, and the location of the center of the pool ball. the radius of the pool balls should be pool_ball_radius, and the font of the number should be pool_ball_font. the text of the pool ball font should be white. drawpoolball(color.orange, 5, 100, 100); drawpoolball(color.green, 6, 50, 200); drawpoolball(color.red, 3, 150, 350); drawpoolball(color.blue, 2, 250, 140); to center the numbers on the pool ball, you should use the getwidth() and getheight() methods. you are allowed to call these methods on your text object, such as txt.
Answers: 3
question
Computers and Technology, 23.06.2019 13:00
Which of the following statements is false? a. a class can directly inherit from class object. b. if the class you're inheriting from declares instance variables as private, the inherited class can access those instance variables directly. c. a class's instance variables are normally declared private to enforce good software engineering. d. it's often much more efficient to create a class by inheriting from a similar class than to create the class by writing every line of code the new class requires.
Answers: 3
question
Computers and Technology, 23.06.2019 16:10
What is the ooh? a. omaha occupation handbook b. online occupational c. occupations online d. occupational outlook handbook select the best answer from the choices provided
Answers: 3
You know the right answer?
Write a function called countstuff () that takes as a parameter a character array, and returns an in...
Questions
question
Mathematics, 09.03.2021 01:00
question
Computers and Technology, 09.03.2021 01:00
question
Mathematics, 09.03.2021 01:00
question
Mathematics, 09.03.2021 01:00
question
Mathematics, 09.03.2021 01:00
Questions on the website: 13722361