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
Anna35 [415]
4 years ago
9

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

he 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. For example, if the input is 4 hello zoo sleep drizzle z The output should be Zoo To achieve the above, first read the list into a vector. Keep in mind that the character 'a is not equal to the character 'A
Computers and Technology
1 answer:
guapka [62]4 years ago
6 0

Answer:

/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
When a job is sent to other countries, as many programming jobs have been, it is said to have been datamined.
OLEGan [10]
<span>When a job is sent to other countries, as many programming jobs have been, it is said to have been datamined. </span><span>
false</span>
6 0
3 years ago
Data validation is the process of a. preventing errors due to invalid data b. preventing errors due to incorrect Transact-SQL sy
professor190 [17]

Answer:

The correct answer to the following question will be "Option A".

Explanation:

Data validation seems to be an important part of every data managing mission unless you are in that area of information or data collection, data processing or planning to deliver the information to stakeholders.

  • Validation could be viewed as something of an integral component of your process instead of as a further move.
  • If your data set isn't correct from the beginning, then your outcomes will undoubtedly not be correct either. That's why the data needs to be checked or tested until it becomes used.

The other three options are not related to the given topic. So Option A is the right answer.

6 0
4 years ago
Complete the following sentence by choosing
Vladimir [108]

Answer:

The correct answer is Option 1: an output device.

Explanation:

A computer is an electronic machine that works according to data and instructions given to it.

The data is the input and information is the output.

Input devices are used to take input and output devices are used to display the results of processing as output.

From the given options, An output device is the one which enables the information to be viewed in easily understandable format.

Hence,

The correct answer is Option 1: an output device.

6 0
3 years ago
Read 2 more answers
Which form of investigation aims at checking whether or not a target system is subject to attack based on a database of tests, s
VikaD [51]

Answer:

<em>Empirical technical </em>research has a fundamental objective, which is to provide objective and independent information on the quality of the product to the interested party or stakeholder. It is one more activity in the quality control process.

Explanation:

Testing is basically a set of activities within software development. Depending on the type of tests, these activities may be implemented at any time during said development process. There are different software development models, as well as test models. Each one has a different level of involvement in development activities.

In a full penetration testing process, there are pre-instances to run this tool, but to take the first steps it is probably the best way to start. Nmap is a network scanning tool that allows you to identify what services are running on a remote device, as well as the identification of active computers, operating systems on the remote computer, existence of filters or firewalls, among others.

In simple words, when a server or device is going to be attacked, the attacker can carry out different attacks depending on the service: it is not the same to damage a web server, a database server or a perimeter router. Therefore, in any deployment, the first step will be to identify the services in the infrastructure, to decide how to proceed and, considering that in a penetration test the steps of an attacker are “imitated”, it will also be started in the same way.

5 0
4 years ago
Ryan wants to connect his flash drive to the computer. Which port should he use?
vodka [1.7K]
A- the USB port
there should be more than one on the computer

8 0
4 years ago
Other questions:
  • The questions are in the pictures, i basically have to create a web page, drop the html code and files below thank you.
    7·1 answer
  • How could a system be designed to allow a choice of operating systems from which to boot? What would the bootstrap program need
    14·1 answer
  • Explicit knowledge can be documented and codified, whereas tacit knowledge encompasses insights, judgment, creative processes, a
    9·1 answer
  • What is Geocortex and how does it work in web or mobile?
    11·1 answer
  • Organizational independence in the processing of payroll is achieved by functional segregations that are built into the system.
    6·1 answer
  • 20. A computer freezes at odd times. At first, you suspected the power supply or overheating, but you have eliminated overheatin
    6·1 answer
  • 3.6 Code Practice Edhesive. (PYTHON LANGUAGE)
    13·1 answer
  • Only need help on f and correct me if im wrong for the other questions please
    11·1 answer
  • Write a function that accepts a pointer to a C-string as an argument and returns the number of words contained in the string. Fo
    13·1 answer
  • Computer operates nearly 100% accurately but why is the phrase'garbage in garbage out'(GIGO) associated with their use?Describe
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!