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
Alexandra [31]
2 years ago
8

Using C, Write a program that reads a series of strings from standard input and prints only those strings beginning with the let

ter 'b'.
Computers and Technology
1 answer:
Mekhanik [1.2K]2 years ago
5 0

Explanation:

/Header file section

#include <stdio.h>

//Program begins with a main function

int main()

{

//Declare variables

char letters[100][20];

int i, num;

//Prompt and read the input from the user

printf("Enter how many series of strings are you entered:");

scanf("%d", &num);

printf("Enter %d strings:\n", num);

for (i = 0; i<num; i++)

 scanf("%s", letters[i]);

//Display those string beginning with letter 'b'

printf("\nThe strings are beginning with the letter \"b\":\n");

for (i = 0; i<num; i++)

{

 //Find start letter is 'b' by using ASCIII

 //(ASCII value of letter 'b' is 98)

 if ((int)letters[i][0] == 98)

  printf("%s\n", letters[i]);

}

return 0;

}

You might be interested in
Configuring a firewall to ignore all incoming packets that request access to a specific port is known as ____.
Sati [7]

Answer: Logical Point Blocking

Explanation:

4 0
1 year ago
Thsi is for gacha girl5467
djyliett [7]

Answer:

lol

Explanation:

3 0
2 years ago
Read 2 more answers
Given a string variable s that has already been declared, write some code that repeatedly reads a value from standard input into
valina [46]

Answer:

The code to this question can be given as:

Code:

while ((s!="Y" && s!="y" && s!="N" && s!="n"))  //loop for check condition

{

cin >> s;  //insert value

}

Explanation:

The description of the following code:

  • In this code, we use a string variable s that has been to define in question.
  • In code, we use a while loop. It is an entry control loop in loop we check variable s value is not equal to "y", "Y", "n" and "N".  
  • In the loop we use AND operator that checks all value together. If this is true So, we insert value-form user input in string variable that is "s".
4 0
3 years ago
Explain how communication is smooth and efficient working​
ohaa [14]

Answer:

To communicate effectively, you need to avoid distractions and stay focused. Inconsistent body language. Nonverbal communication should reinforce what is being said, not contradict it. If you say one thing, but your body language says something else, your listener will likely feel that you're being dishonest.

8 0
2 years ago
Read 2 more answers
A custom information field that helps users to find a specific document is called
Vlada [557]
Database, a collection of information, basically an electronic filing system.. it helps users to <span>quickly </span><span>select and </span>find a desired pieces of data.
3 0
3 years ago
Read 2 more answers
Other questions:
  • Zara is designing a slide with a numbered label on a picture. She wants the number to appear when the she presses a button on th
    11·2 answers
  • Julie bought a house for $315,000 and has a $285,000 mortgage. she claims she has $315,000 in equity. is she correct? if not, ho
    12·2 answers
  • You're programming an infinite loop. What must you include in your code to prevent crashes?
    15·2 answers
  • Would these statements cause an error? Why or why not? int year = 2019; int yearNext = 2020; int &amp; ref = year; &amp; ref = y
    7·1 answer
  • What defines "print media"? It is media that includes words and text rather than video, such as many blogs. It is media that is
    8·1 answer
  • Question #4
    8·1 answer
  • Write a list comprehension that creates a list containing the numbers that result from the values 1 through 10 being multiplied
    15·1 answer
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    8·1 answer
  • What starts with p and ends with orn
    15·2 answers
  • We call any device connected to the Internet a(n) ________. Group of answer choices router host IP client
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!