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

Assume s is a string of lower case characters.

Computers and Technology
1 answer:
sattari [20]3 years ago
5 0
Here's an attempt in C:

#include <string.h>

int CountBob(const char * s)
{
   int n = 0;
   while (s = strstr(s, "bob")) {
      n++; 
      s++;
   }
   return n;
}

int main()
{
   char *s = "azcbobobegghakl";
   int n = CountBob(s);
   printf("Number of times bob occurs is: %d", n);
   getchar();
}


You might be interested in
(in python)Write a program that takes a date as input and outputs the date's season. The input is a string to represent the mont
alexgriva [62]

Answer:

free points boi

Explanation:

3 0
3 years ago
Write a function so that the main program below can be replaced by the simpler code that calls function mph_and_minutes_to_miles
Blababa [14]

Answer:

Here is  code in python .

#function to calculate miles traveled

# pass two parameter in the function "miles_per_hour" and "minutes_traveled"

def mph_and_minutes_to_miles(miles_per_hour, minutes_traveled):

# convert minutes to hours

   hours_traveled = minutes_traveled / 60.0

   #calculate total miles traveled

   miles_traveled = hours_traveled * miles_per_hour

   #return the value

   return miles_traveled

#read input from user

miles_per_hour = float(input())

minutes_traveled = float(input())

#call the function and print the output

print('Miles: %f' % mph_and_minutes_to_miles(miles_per_hour, minutes_traveled))

Explanation:

Read the value of "miles_per_hour" and "minutes_traveled" from user. call the function mph_and_minutes_to_miles() with those two parameters.calculate total hours from the minutes_traveled by dividing it with 60. then calculate the total miles by multiply hours_traveled * miles_per_hour. then return the miles travelled.

Output:

20                                                                                                                        

150                                                                                                                        

Miles: 50.000000

4 0
3 years ago
The objective of ____ is to gather useful data about the system under study.
mamaluj [8]
The answer that best fits the blank provided is the term is DATA COLLECTION. The main goal of data collection is the gathering of relevant data regarding the system that is under study. There are many ways of data collection and it would differ depending on what type of information you are going to gather.
7 0
4 years ago
Http, https, CSS, JavaScript, DHTML, and HTML are types of coding and formatting behind web pages.
Dovator [93]

Answer:

FALSE

Explanation:

HTTP ( Hyper text transfer protocol ) : HTTP is a protocol used by the world wide web and it defines how messages are formatted and transmitted, they are actually not part of the formatting and they also determines actions to be taken by web browsers in response to commands.

JavaScript, CSS, HTML  are all markup languages written in codes while creating a website/web page.

D HTML ( dynamic HTML ) is a collection of technologies like CSS, JAVA SCRIPT and HTML  to create Animated and interactive websites and this entails a lot of coding and formatting.

7 0
4 years ago
Read 2 more answers
Which HTML tag is formatted correctly? This is a heading This is a paragraph This is a paragraph This is a heading
Dimas [21]

Answer:

See Explanation Section

Explanation:

A question like this is best presented or supported with attachments because the attachment gives a clear description of the question.

However, I'll answer your question in general terms.

A paragraph in HTML is tagged using the <p> and </p> tag.

For instance:

<p> This is a paragraph</p>

For headings;

There are 6 level of headings in HTML; h1 to h6.

The tag to use depends on the level of the headings.

Assuming the heading is level 1;

An example is

<h1> This is a heading</h1>

Use the examples I cited to answer your question

7 0
3 years ago
Read 2 more answers
Other questions:
  • Write a brief explanation of the problems that can occur in each of the following scenarios and what you should do to avoid thes
    13·1 answer
  • When preparing a photo for a magazine, a graphic designer would most likely need to use a program such as Microsoft Excel to kee
    11·1 answer
  • One reason to buy a home instead of rent a home is:
    5·1 answer
  • The primary reason for a company to outsource jobs is to
    8·2 answers
  • (Find the number of days in a month) Write a program that prompts the user to enter the month and year and displays the number o
    8·1 answer
  • Your one output statement should occupy two lines in your program
    13·1 answer
  • Where do file name extensions appear?
    14·1 answer
  • A(n) ________ HTML tag is used to mark information about the page.
    12·1 answer
  • Conceptual note-taking is the act of writing down information in the order it is given. drawing attention to details with a mark
    8·2 answers
  • A list contains the following items: Antelope, Baboon, Cheetah, Elephant, Giraffe, Hippo, Jackal, Lion, Okapi, Warthog. ​(a)​A b
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!