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
What are the different options in a page layout feature ? Select three options
Sever21 [200]

Answer:

Half Center Right Left, theres four

Explanation:

5 0
3 years ago
Write a java program as follows Write a method called powOfTwo that takes an integer as parameter, computes, and outputs it’s sq
Kisachek [45]

Answer:

public static int powOfTwo(int input) {

 return input*input;

}

You will have to call this method in main
for printing it, write

System.out.println(powOfTwo(your number));

in public static void main(str[]args) {

}

8 0
2 years ago
In the context of a manager's roles, a _____ is an informational role that involves seeking and receiving information, scanning
Marina CMI [18]

Answer: Monitor

Explanation: Monitor role is the role played by the person in the management that processes the information.The role has the responsibility of the seeking data and records of the organization.

Organizing or managing ,scanning the data that is seeked and accordingly changes are made is the function of the monitor. Monitors also examines the productivity and the processing in the management.

5 0
3 years ago
Sequential and direct access are two methods to locate data in memory. Discuss why major devices now a days use direct access? H
djverab [1.8K]

Answer:

Direct data access reduces the speed of retrieving data from memory or storage. Retrieving data and storing it in a cache memory provides direct access to data in the storage.

Explanation:

Sequential memory access, as the name implies, goes through the memory length location in search of the specified data. Direct memory access, provides a memory location index for direct retrieval of data.

Examples of direct and sequential memory access are RAM and tapes respectively. Data in sequential memory access can be access directly by getting data in advance and storing them in cache memory for direct access by the processor.

3 0
3 years ago
Does anyone know python 3? my code isnt working and i dont know anyone who can help me​
Gekata [30.6K]

Answer:

One of the most important skills you need to build as a Python developer is to be able to run Python scripts and code. This is going to be the only way for you to know if your code works as you planned. It’s even the only way of knowing if your code works at all!

This step-by-step tutorial will guide you through a series of ways to run Python scripts, depending on your environment, platform, needs, and skills as a programmer.

Explanation:

7 0
3 years ago
Other questions:
  • A data structure used to bind an authenticated individual to a public key is the definition of ________.
    14·1 answer
  • When a formula contains the address of a cell, it is called a(n)
    9·1 answer
  • On what basis can you categorize the generations of computers?
    5·1 answer
  • Lucy wants to develop a web page to display her profile. She wants to just start with a basic page that lists her accomplishment
    13·1 answer
  • One of your professors has asked you to write a program to grade her midterm exams, which consist of only 20 multiple-choice que
    15·1 answer
  • You have just purchased a motherboard that has an LGA 1156 socket for an Intel Pentium processor. What type of memory modules wi
    14·1 answer
  • Write the include directive needed to allow use of the various i/o functions and values such fprintf and fgetc.
    12·1 answer
  • What is lasso tool write the name of any modelling and animation software<br>​
    8·1 answer
  • which term describes the layer of software that resides between the virtual operating system and the physical hardware it runs o
    5·1 answer
  • Both tangible and intangible property? are not covered by intellectual property protections. are both covered by intellectual pr
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!