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
anygoal [31]
3 years ago
15

25 POINTS HELP PLEASE IM TIMED

Computers and Technology
1 answer:
Studentka2010 [4]3 years ago
8 0
Answer: b) implicit hth :)
You might be interested in
Write a program whose input is a character and a string, and whose output indicates the number of times the character appears in
Zina [86]

Answer:

Here is the C++ program:

#include <iostream> // to include input output functions

using namespace std; // to identify objects like cin cout

int counter(string userString, char character) { //function counter

   int count = 0;   // counts the no of times a character appears in the string

   for (int i=0;i<userString.length();i++)  

// loop to move through the string to find the occurrence of the character

       if (userString[i] == character) //if characters is found in the string

           count++;   //counts the occurrence of the character in the string

   return count; }   //returns the no of times character occurs in the string

int main() { //start of the main() function body

   string s; // stores the string entered by the user

   cout<<"Enter a string: "; //prompts user to enter the string

   cin>>s; //reads the string from user

   char ch; //stores the character entered by the user

   cout<<"Enter a character: "; //prompts user to enter a character

   cin>>ch; //reads the character from user

   cout << counter(s, ch) << endl; }  

//calls counter function to find the number of times a character occurs in the //string

Explanation:

The counter function works as following:

It has a count variable which stores the number of occurrences of a character in the userString.

It uses a for loop which loops through the entire string.

It has i position variable which starts with the first character of the string and checks if the first character of userString matches with the required character.

If it matches the character then count variable counts the first occurrence of the character and in the userString and is incremented to 1.

If the character does not match with the first character of the userString then the loops keeps traversing through the userString until the end of the userString is reached which is specified by the length() function which returns the length of the string.

After the loop ends the return count statement is used to return the number of occurrences of the character in the userString.

The main() function prompts the user to enter a string and a character. It then calls counter() function passing string s and character ch arguments to it in order to get the number of times ch appears in s.

The output is attached in a screenshot.

6 0
3 years ago
What type of game is LEAST LIKELY to need a structured narrative?
VladimirAG [237]

Answer:

Probably a sports game

Explanation:

A role-playing means acting it out, so you need to explain the life with a structured narrative.

An adventure game needs lots of background, so you need to fill that in with a structured narrative.

A sports game revolves solely around sports, so you only need to know how to play the game and/or sport, so no structured narrative is needed.

An fps game needs a structured narrative in that it is similar to an adventure game and needs background.

Let me know if I was right! Hope this helped. :)

5 0
3 years ago
Which of the following do you need to remeber about true/false questions?
lina2011 [118]
All parts of a statement must be true for it to be true
7 0
3 years ago
They predicted another cold day in Seattle. They predicted another windy day in Seattle. Combine the sentences into one sentence
VLD [36.1K]

Answer:

They predicted another cold day in Seattle and another windy day in Seattle.

4 0
3 years ago
Introduction or background of corporal punishment in schools
tensa zangetsu [6.8K]

Answer:

Corporal punishment is a discipline method in which a supervising adult, such as a teacher, deliberately inflicts pain upon a child in response to a child's unacceptable behavior or inappropriate language. The goals of this type of punishment are usually to halt the offense immediately, prevent it from happening again, and set an example for others.

3 0
2 years ago
Other questions:
  • What technique is used to separate the different cell parts?
    15·1 answer
  • Consider a computer that has a number of registers such that the three registers R0 = 1500, R1 =4500, and R2 = 1000.
    14·1 answer
  • What does subscribing to a website’s RSS feed provide to a subscriber?
    10·1 answer
  • Which of the following is not a good technique for photographing groups? Visiting the location.
    9·1 answer
  • Graphic design includes typefaces, page layouts, corporate logos, and product packaging. Which modern graphic designer is best k
    14·2 answers
  • When searching for an image on your computer, you should look for a file with which of the following extensions?
    8·1 answer
  • What is the orbit? Define
    12·1 answer
  • What are the parts of a file?​
    9·1 answer
  • I still need help, thank you! Will give Brainliest ​
    10·1 answer
  • Under what scenarios can we clear the NVRAM by moving the PSWD jumper to the RTCRST<br> pins?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!