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

Write a program that reads a series of strings andprints only those strings beginning with the letter "b."

Computers and Technology
1 answer:
coldgirl [10]3 years ago
6 0

Answer:

#include <iostream>

using namespace std;

int main()

{

char str[100][20];

int n;

cout<<"Strings you want to enter"<<endl;

cin>>n;

cout<<"enter n strings"<<endl;

for(int i=0;i<n;i++)

cin>>str[i];

for(int i=0;i<n;i++)

{

if((int)str[i][0]==98) //ascii value b is 98

cout<<str[i]<<endl;

}

return 0;

}

Explanation:

The above written code is for printing the strings which starts with the letter b.

To check if the string starts with a letter b we are checking the ascii value 98 which corresponds to b and then printing those strings.

You might be interested in
What are the nuclear codes?
inn [45]

Answer:

Nuclear codes allow the president to prove the individual is authorized to order the launch.

Explanation:

Hope this helps!

If not, I am sorry.

3 0
1 year ago
Which three pieces of information should be included in an artist statement? Select all that apply.
Dima020 [189]

Answer:

There is no answers given??

Explanation:

N/A

4 0
3 years ago
Can someone that been helping me answer one more question for please and thx
Gnom [1K]

Answer:

D

Explanation:

Federal Tax, not state

5 0
3 years ago
Rikki has had several problems at work recently. Her printer isn't printing correctly, copies from the copy machine come out wit
Ghella [55]
Create a maintenance schedule 
3 0
3 years ago
Read 2 more answers
Which is a good example of kinetic energy
Alexandra [31]

Answer: A. Flying a paper airplane.  

5 0
3 years ago
Read 2 more answers
Other questions:
  • Was the big blue button thing a good decision or bad?<br> *I think it was a bad idea.
    15·2 answers
  • The main purpose of a constructor is to initialize the data members at the moment that an object is created. true or false?
    8·1 answer
  • What correctly describes the features of the service called kickstarter?
    14·2 answers
  • Which sentence is correctly punctuated? WILL GIVE YU MONEY GIVE ME YOUR CASH APP PLS
    12·2 answers
  • PLEASE HELP!! WILL MARK BRAINLIEST!!
    9·1 answer
  • Write a code that takes numbers from the user as a list. (User can enter as many numbers as he wants). Then, find mean and stand
    15·1 answer
  • For a parking application that lets you pay for parking via your phone, which of these is an example of a functional requirement
    8·1 answer
  • The computer components that enables a computer to send and receive data, instructions or information from one or more computers
    13·1 answer
  • What is the name for data generated by a computer using an algorithm?
    7·1 answer
  • What can you do to make sure no one outside your company can gain access to its wireless network?
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!