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
(Financial application: compound value) Suppose you save $100 each month into savings account with an annual interest rate of 5%
Nostrana [21]

Solution:

initial = float(eval(input('Enter the monthly saving amount: ')))

x = (1 + 0.00417)

month_one = initial * x

month_two = (initial + month_one) * x  

month_three = (initial + month_two) * x  

month_four = (initial + month_three) * x

month_five = (initial + month_four) * x  

month_six = (initial + month_five) * x  

print('The sixth month value is: '+str(month_six))  

Don't forget the saving amount, and initialize the balance with that amount. Inside the loop, work out and add the interest and then add the saving amount for the next month.

balance = 801

for month in range(6):

  balance = balance * (1.00417)

print(balance)

7 0
3 years ago
25 points select 3 options!!!!!!!!!!!!!!!!!!!!!!!!!
STALIN [3.7K]
A, B , and E sorry if I’m wrong
4 0
3 years ago
These can be nodes in a computer network
Hunter-Best [27]

Answer:

Computers

Explanation:

Node is an electronic device. It is the Physical components that can send, receive or forward data.

Computer is an electronics devices and also have ability to send, receive or forward data. so this is the reason that, we can say computer is a node in computer network.

6 0
3 years ago
the ratio of length, breadth and height of a room is 4:3:1. If 12m^3 air is contained in a room, find the length , breadth and h
Bumek [7]

Explanation:

The ratio of length, breadth and height of a room is 4:3:1

Let length = 4x

Breadth = 3x

Height = x

Volume of air contained in the room, V = 12 m³

We need to find the length, breadth and height of the room. The room is in the shape of a cubiod. The volume of a cuboid is given by :

V = lbh

4x\times 3x\times x=12\\\\12x^3=12\\\\x=1

Height of the room = 1 m

Breadth of the room = 3x = 3 m

Length of the room = 4x = 4 m

7 0
3 years ago
You can use a 32-bit processor to install the hyper-v role as long as it supports virtualization extensions. true or false
Ainat [17]
No, that is false. :)
3 0
4 years ago
Other questions:
  • Which command is used to add conditions to the basic query?
    15·1 answer
  • What is an advantage of sharing documents in PDF format instead of Word format?
    6·2 answers
  • Michelle is a salesperson who is paid on commission. She just sold a customer a very reasonably priced tablet, but only after th
    14·1 answer
  • 1.2 Data transmission speed.Unit of measurement used to measure in bits per second.1000 bits per second (bps)=
    11·1 answer
  • What type of hardward drive not require defragging??
    11·1 answer
  • The __________ utility has the capability to manage users, create and administer user groups, and apply user rights to those use
    8·1 answer
  • The results of the SPEC CPU2006 bzip2 benchmark running on an AMD Barcelona has an instruction count of 2.389E12, an execution t
    6·1 answer
  • What is processing requirement in computer?
    11·1 answer
  • Places where computer are used​
    11·2 answers
  • The following equations estimate the calories burned when exercising (source):
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!