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
Rus_ich [418]
3 years ago
14

in c Write a program that reads an integer, a list of words, and a character. The integer signifies how many words are in the li

st. The output of the program is every word in the list that contains the character at least once. Assume at least one word in the list will contain the given character. Assume that the list will always contain less than 20 words. Each word will always contain less than 10 characters and no spaces.
Computers and Technology
1 answer:
Fiesta28 [93]3 years ago
3 0

Answer:

see explaination

Explanation:

//Include required header file.

#include <stdio.h>

//Define the function isWordContainChar() having the

//required parameters.

int isWordContainChar(char* req_word, char search_char)

{

//Declare required variable.

int i;

//Start a for loop to traverse the string given in

//the function parameter.

for(i = 0; req_word[i] != '\0' ; i++)

{

//If the current character in the gievn word is

//matched with the character which needs to be

//found in the word, then return 1.

if(req_word[i] == search_char)

{

return 1;

}

}

//Otherwise, return 0.

return 0;

}

//Start the execution of the main() method.

int main(void)

{

//Declare the required variables.

int num_words, index, word_index;

char str_word[20][10];

char searchCharacter;

//Prompt the user to enter the number of words.

scanf("%d", &num_words);

//Prompt the user to enter the required words using a

//for loop and store them into an array.

for(index = 0; index < num_words; index++)

{

scanf("%s", str_word[index]);

}

//Prompt the user to enter a required character which

//needs to be found in a word.

scanf(" %c", &searchCharacter);

//Traverse the words stored in the array using a for

//loop.

for(index = 0; index < num_words; index++)

{

//Call the function isWordContainChar() with

//required arguments in rach iteration and if the

//value returned by this function is not 0, then

//display the current string in the array.

if(isWordContainChar(str_word[index],

searchCharacter) != 0)

{

printf("%s\n", str_word[index]);

}

}

return 0;

}

You might be interested in
What was the worlds first coding language
svetoff [14.1K]

Answer:

lol baby

Explanation:

becuase it goated

8 0
2 years ago
Read 2 more answers
The navigation items for a Lightning app are available on mobile: A. In a special mobile configuration in the navigation menu an
mr_godi [17]

Navigation items are used for moving from one part of the part to a destination using actions and also for passing information. The right option is  <em>C. In the navigation menu and the first four items of the </em><em>navigation bar</em><em>, when users are in the app </em>

<em />

There are different methods/ways to implement the Navigation component in a mobile application, we have the following type of Navigation Implementation

  1. Bottom Navigation
  2. Drawer Navigation(Slides from Left to right)
  3. Top Navigation

Learn more about Navigation here:

brainly.com/question/8908486

5 0
3 years ago
A. True
Artist 52 [7]

This is true. In some languages, constructors can be made private to restrict the ways in which objects can be created.

4 0
3 years ago
Seven Features of computer aids design software
astra-53 [7]
Computer-aided engineering (CAE) and finite element analysis (FEA) Computer-aided manufacturing (CAM) including instructions to computer numerical control (CNC) machines. Photorealistic rendering and motion simulation. Document management and revision control using product data management (PDM).
3 0
3 years ago
Which of the following identifies a user based on anatomical characteristics such as a fingerprint, a voice print, or iris patte
antiseptic1488 [7]

Answer:

Biometrics

Explanation:

Biometrics is the techniques that is used to measure and identify different characteristic of human being that are usually unique in nature for individuals such as voice characteristics, eye retina and finger prints. These features are unique for every person. These features could be used for different purposes now a day such biometric identification, biometric verification and for forensic purposes.

There are different algorithms to compute and compare these unique characteristics for each user and store in a database for the purpose of identification of the users. This data can also be used for forensic purpose if needed by some security agency to identify some person.

The type of identification in which these features such as voice, finger prints and iris pattern use is called biometrics.

3 0
3 years ago
Other questions:
  • Fullsoft, Inc. is a software development company based in New York City. Fullsoft’s software product development code is kept co
    10·1 answer
  • Hot five was the famous band of which musician?
    14·1 answer
  • If you wish to include a header or footer on all pages in a publication, you will need to insert this by navigating to the _____
    11·2 answers
  • The following code processes a file containing five positive numbers. What will the variable $result contain after the code is e
    10·1 answer
  • Implement the RC4 stream cipher in C++. User should be able to enter any key that is 5 bytes to 32 bytes long. Be sure to discar
    7·1 answer
  • Post as a reply your example of "data, which is processed into information" case - examples should not necessarily be related to
    13·1 answer
  • Adobe reader is a type of​
    14·2 answers
  • What is the working principle of computer?​
    10·1 answer
  • 25 Points Asap <br> Write a Java program named Light.java that displays a light bulb shown below:
    14·1 answer
  • Write a C# program named ProjectedRaises that includes a named constant representing next year’s anticipated 4 percent raise for
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!