1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
DaniilM [7]
2 years ago
6

Write a function called countstuff () that takes as a parameter a character array, and returns an int. The prototype must be:

Computers and Technology
1 answer:
PSYCHO15rus [73]2 years ago
5 0

Answer:

Please kindly go to the explanation part.

Explanation:

The required function is written in Raw code below.

Function:

#include<stdio.h>

#include<ctype.h> //including required libraries

int countstuff(char s[]){ //Function countstuff

int cntUp=0,cntLow =0,cntDigits = 0,i=0,value; //declaring required variables

for(i=0;s[i]!='\0';i++){ //loop to iterate over the characters of string

if(isupper(s[i])){

cntUp++; //incrementing count of uppercase if it is uppercase character

}

else if(islower(s[i])){

cntLow++; //incrementing count of lowercase if it is lowercase character

}

else if(isdigit(s[i])){

cntDigits++; //incrementing count of digits if it is digit

}

}

value = cntUp*1000000 + cntLow*1000 + cntDigits; //counting value using formula given in question

return value; //returning the value

}

void main(){

char string[1000]; //declaring required variables

int value;

printf("Enter a String:");

scanf("%[^\n]s",string); //taking string as input

value = countstuff(string); //calling function

printf("The Value is : %d\n",value); //printing result

}

You might be interested in
Give state diagrams of DFAs that recognize the following languages.
k0ka [10]

Answer:

Following is attached the solution of each part step-by-step. I hope it will help you!

Explanation:

6 0
3 years ago
What are the six peripherals of a computer system
Lubov Fominskaja [6]
Peripherals fall into three categories:
1. input devices are devices that put commands inside computers such as keyboards, mouses, and joysticks but the first two are the mostly used nowadays
2. output devices are what computers give out such as monitors, printers, speakers and I think projectors also fall into that category
3.storage devices such as a optical drive, hard drive, SDD, flash drive
So the main ones might be a mouse, keyboard, monitors, I think printers, hard drives and flash drives but speakers might be considered as one instead of a flash drive.

4 0
2 years ago
Mitchell doesn’t have a checking account, but needs to pay a bill, what can Mitchell pay with?
aleksandr82 [10.1K]
Cash, possibly credit card.
5 0
3 years ago
Read 2 more answers
Illustrate why Sally's slide meets or does not meet professional expectations?
givi [52]

The correct answer to this open question is the following.

Unfortunately, you did not provide any context or background about the situation of Sally and the problem with her slides. We do not know it, just you.

However, trying to be of help, we can comment on the following general terms.

When someone does not meet professional expectations, this means that this individual did not prepare her presentation, lacked technical skills, did not included proper sources, or missed the proper visual aids to make the presentation more attractive and dynamic.

What Sally can improve about her slides is the following.

She can design a better structure for the presentation to have more congruence.

Sally has to clearly establish the goal or goals for her presentation.

She has to add many visuals instead of plain text. This way she can better capture the interest of her audience.

If she can use more vivid colors instead of pale or dark ones, that would be best.

No paragraphs unless necessary. She better uses bullet points.

Take care of the tone of her voice. During her practice, she can record her vice to check how it sounds.

5 0
2 years ago
Identify aspects of contemporary society that might lend themselves to a Commedia-type scenario or short play (ex: the British R
Helen [10]

Answer:

pls type clearly to understand i can't understand

4 0
3 years ago
Other questions:
  • What combination of words and boolean operators would display all audio files about chiropractic?
    6·1 answer
  • What kind of game was Pole Position?
    14·1 answer
  • The email application used by Jim’s office is sending emails with viruses attached to them to user’s computers. What step should
    13·2 answers
  • How is a correction made to an Electronic health record?
    14·1 answer
  • What is the output of the following program?
    9·1 answer
  • The text defines ________________ as the obsessive use of computers, or the unauthorized access and use of networked computer sy
    14·1 answer
  • San Diego broker Cal Abrams has avoided the technological trend of the past 20 years. Finally, he's jumped online and realized w
    14·1 answer
  • Why would it be unusual to find a fossil of an organism’s eye?
    11·1 answer
  • 1
    7·1 answer
  • Why do Linux administrators prefer to give sudo access to application teams instead of letting them su to root?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!