![amila17](/avatars/13659.jpg)
amila17
06.10.2019 •
Computers and Technology
Assume s is a string of lower case characters.
write a program that prints the number of times the string 'bob' occurs in s. for example, if s = 'azcbobobegghakl', then your program should print
number of times bob occurs is: 2
Solved
Show answers
More tips
- W Work and Career Where can you learn to be a flight attendant?...
- C Cities and Countries What time does the Metro open in Moscow?...
- S Style and Beauty How to Get Rid of Under Eye Bruises?...
- F Food and Cooking How to Calculate the Gender of Your Child with Blood?...
- C Computers and Internet IMHO: What is it, why is it important, and how to use it?...
- H Health and Medicine Effective Ways to Treat Colic in Infants...
- H Health and Medicine How to Treat the Flu: A Comprehensive Guide...
- S Style and Beauty 5 Tips for Choosing the Best Ugg Boots...
- C Computers and Internet How to Create a Folder on Your iPhone?...
- C Computers and Internet iPhone SMS Delivery Report: How to Set It Up...
Answers on questions: Computers and Technology
- C Computers and Technology Under what situation should a command not process a sailor for administrative separation following a treatment failure...
- C Computers and Technology Write an SQL statement to list all of the names of students who have not taken a classwith an instructorwho is a faculty of theComputer Sciencedepartment. Constraints:-Useat least...
- C Computers and Technology If nothings faster than light then how do the dark get there...
- C Computers and Technology PLS HELP IM SO DESPERATE!! 40 points Consider how you would help your Uncle Sandro diagnose the location of the problem and offer a likely solution in the following scenario: Uncle...
- M Mathematics There are 5 hidden treasures in Level 1 of a smartphone game. Each of the other levels has 1 more hidden treasure than the previous level. a. How can you use the level number in the...
- P Physics Find the output current i0(mA...
- S Social Studies Intunesw wodosaya o nosos monoh anh...
- H History Child labor was common during the Industrial Revolution for all of the following reasons except?...
- M Mathematics What is the missing constant term in the perfect square that starts with x^ 2 + 6 x...
- M Mathematics 5. Given two circles, A and B, with radii 9 in. and 10 in. respectively, the ratio of the areas is...
Ответ:
#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();
}
Ответ:
Step-by-step explanation:
Since y must be 4x or equal to x times 4, we just take the entries and see if when multiplied by 4, the x entries equal the y entries.
A.
0 x 4 = 0
2 x 4 = 8
3 x 4 = 12
0, 8, 12
4, 8, 12
B.
1 x 4 = 4
2 x 4 = 8
3 x 4 = 12
4, 8, 12
4, 8, 16
C.
1 x 4 = 4
4 x 4 = 16
4 x 5 = 20
4, 16, 20
4, 8, 12
D.
2 x 4 = 8
4 x 4 = 16
8 x 4 = 32
8, 16, 32 = 8, 16, 32
D is the answer
I'm always happy to help :)