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
In Web design, What kind of tag is referred to as fixed ?<br>​
Tpy6a [65]

Answer:

Most HTML tags are fixed

Explanation:

There are various kind of technology one can use for designing web application. A web designer should know HTML, CSS and other basic building block of web development.

HTML meaning hypertext markup language is used to define the basic structure of a web page . HTML has tags which are used to declare the contents on the web page. The tags includes anchor(<a>), paragraph tag(<p>),header tag(<h1>).

CSS which is known as Cascading style sheet describes the presentation of the web pages.

Other tags in HTML includes <img>, <link>, <ul>  etc and generally this tags are HTML tags which are fixed for a particular kind of job . For example you can't use an image tag <img>   to enclose video instead you use a video tag <video> tag. The header tag <h1> cannot be represented like a paragrapgh tag<p> on the web page. The both of them serve specific purpose and are fixed.  

7 0
2 years ago
when a user has the requirement to stay connected 100% of the time as they move throughout the WLAN coverage area, what are they
zimovet [89]
They are concerned about many things
5 0
3 years ago
Dustin is editing a SmartArt graphic. He wants all three shapes to be different colors.
lilavasa [31]

Answer:

click on Design tab → select associated shape → adjust color

Explanation:

I think it is that but i'm not positive. I will know in a little bit since I am taking the test right now.

6 0
3 years ago
The view that perceptual processes take place over time and can be thought of in terms of a software/hardware metaphor is known
Wittaler [7]

The view that perpetual processes can be thought of in terms of a software/hardware metaphor is known as the: information processing view.

<h3>What is the Information Processing View?</h3>

Information processing view is explained by the cognitive theory to explain how the brain encodes information and how information are filtered from what we pay attention to in a particular moment. This also determines what is stored in the short-term or in our long-term memory.

Therefore, the view that perpetual processes can be thought of in terms of a software/hardware metaphor is known as the: information processing view.

Learn more about the information processing view on:

brainly.com/question/24863946

3 0
2 years ago
Anyone watch anime, i love stay kids and they sang the op for Tower of God XD
TEA [102]

Answer:

I do Stray kids and Tower Of God is good combo mannnn

6 0
3 years ago
Read 2 more answers
Other questions:
  • Write a function called ReverseLetters that takes an input phrase consisting of a single word and reverses the sequence of lette
    15·1 answer
  • A type TW cable containing two No. 12 copper conductors has a maximum overcurrent protection of
    7·2 answers
  • A base class named Garden contains a private field width and a property public int Width that contains get and set accessors. A
    11·1 answer
  • You decide to begin your presentation by providing your audience an overview of networking, with an emphasis on security and why
    11·1 answer
  • Write an expression that computes the average of the values 12 and 40.
    6·1 answer
  • The file descriptor stderr is represented by the number ____.
    6·1 answer
  • What would be an ideal scenario for using edge computing solutions?
    10·1 answer
  • You decide to test an audio clip that you have inserted into your presentation, but before you do that you make sure that the co
    6·1 answer
  • Plz help Complete the sentence.
    11·2 answers
  • Design and implement an application that reads a string from the user then determines and prints how many of eachlowercase vowel
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!