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]
3 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]3 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
Meaning of mesh topology​
Pachacha [2.7K]

The meaning of mesh topology​ is that it is a type of networking that is made up of the fact that all its nodes do work together to share data amongst each other.

<h3>What is meant by mesh topology?</h3>

Mesh topology is a kind of networking that is said to be where the full nodes do act in a form of a cooperation  so that they can be able to share or distribute data among themselves.

Note that this topology was said to be first seen or developed in about an approximate of about 30+ years ago and it is one that is often used in military applications and now it is seen to be used in home automation, smart HVAC control, and others.

Hence, The meaning of mesh topology​ is that it is a type of networking that is made up of the fact that all its nodes do work together to share data amongst each other.

Learn more about mesh topology​ from

brainly.com/question/14879489

#SPJ1

6 0
2 years ago
Linda installed a special pool for the hydrotherapeutic treatment of severe arthritis, as prescribed by her doctor. The cost of
stellarik [79]

Answer:

Linda is entitled to deduction (before any AGI limitations) of $896 in one year of installation of the pool.

Explanation:

Following is explained calculation for deduction (before any AGI limitations) that is Linda entitled to in the year of installation of the pool.

Given that:

Cost of Installing the pool = $22,400

Paid by insurance company = $5,600

So by deducting the price paid by insurance company from total cost the balance becomes:

Balance = $22,400 - $5,600 = $ 16,800

As the pool increased the value of house by $7,840 so we will deduct this amount from balance:

Balance = $ 16,800 - $7,840 = $8,960

As the useful life given for pool is 10 years so we will divide the balance with 10 to obtain the deduction amount for 1 year:

Deduction amount for one year = $8,960/10 = $8,96

Hence $8,96 will be deducted in one year installation.

i hope it will help you!

7 0
4 years ago
What is the financial aspect for a business as to what database software they will buy?
Masteriza [31]

Answer:  Database software is bought on basis of the processing, cost, requirement etc for any particular . According to the financial perspective the database  software should have the following characteristics:-

  • Database software that has most accurate and main feature according to the business requirement is selected for buying and the others with extra features are not considered as more feature cost more amount  which is not needed.
  • Database software which is still in progress to be built is pre-booked and money is invested on it because the price of the required software might increase after getting completed.
  • Scalable database software should be bought so that it can extend according to need at low cost.

 

8 0
4 years ago
When you align or size a group of selected controls, the changes are made relative to the
babunello [35]

Answer:

The primary control.

When you align or size a group of selected controls, the changes are made relative to the primary control.

Explanation:

When selected controls are set together, apart from the primary control, to be executed, they take preeminence over the established primary controls.

3 0
3 years ago
If a code word is defined to be a sequence of different letters chosen from the 10 letters A, B, C, D, E, F, G, H, I, and J, wha
netineya [11]

Answer:

The answer is 6:1 .

Explanation:

We don't need to have prior knowledge of combination or permutation.

Count the way to chose 4 letters.As given in the question chose sequence of different letters

For first place we have 10 letter

For second place we have 9 letter as one is already out

For 3 place we have 8 letter as two letter are already out

For 4 place we have 7 letter as three letter are already out

Total group of 4 letters = 10 * 9 *8*7

Similarly form group of 5 letters we have

Total group of 5 letters = 10 * 9* 8 * 7*6

then Calculating ratio between 4 and 5

We have,

Group 5 : Group 4 ::10 * 9* 8 * 7*6:10 * 9 *8*7

                              : : 30240 : 5040

divide by 5040 on both side we get

Group  5: Group 4 :: 6 : 1

5 0
3 years ago
Other questions:
  • Apakah maksud input dan output ?<br>​
    12·1 answer
  • After a webcast is completed there are no files left on your computer.
    14·1 answer
  • Which of the following is a malicious program that can replicate and spread from computer to computer?
    8·2 answers
  • Dialogue is not a characteristic of functional text because
    9·1 answer
  • You have been approached by the network administrator of the company whose office is adjacent to yours. He has advised you to mo
    5·1 answer
  • How would you define the rule of thirds?
    11·1 answer
  • Jeremy is working with a team that is creating an application using attributes and associated methods. What type of programming
    8·1 answer
  • Research the significance of the UNIX core of macOS and write a few sentences describing your findings.
    8·1 answer
  • Heuristics are not always completely accurate.<br><br><br> Correct or wrong?
    10·2 answers
  • Help help help help help help
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!