kaffolter25
31.07.2019 •
Computers and Technology
Fill in the blank for these ! katherine was working as a part of team in her firm. however, due to project requirements, she was sent to the client site to complete her work. what kind of skills would katherine require in order to work independently? katherine will need to have(blank)in order to work independently.
Solved
Show answers
More tips
- A Animals and plants Уход за джунгариками: полезные советы и рекомендации...
- L Legal consultation What Documents Are Required for a Russian Passport?...
- S Sport How to Choose Tennis Rackets?...
- H Health and Medicine AKDS Vaccination: Ensure Your Child s Safety...
- H Health and Medicine Naskol ko Opasen Ukus Kleshcha i Kak Ego Raspoznat...
- C Computers and Internet How to Delete Your Account on Odnoklassniki...
- H Health and Medicine What to Do When Your Jaw Locks Up?...
- G Goods and services What Are the Most Popular Services?...
- P Philosophy How did the concept of module arise in computer science?...
Answers on questions: Computers and Technology
- C Computers and Technology If you fear you have been abusive to a partner, what can you do?...
- C Computers and Technology 9. reference points relate parts of the vehicle to a. your seating position b. some areas of the roadway c. other cars on the road d. its balance...
- C Computers and Technology Acar travels 172 miles using 7 gallons of gas. at that rate, how far can the car travel using 42 gallons of gas?...
- C Computers and Technology Application programs can users write their own programs in a form the computer can understand using a programming language such as visual basic, cobol, c++, java, or...
- E English Homework Identify the of type adverbial douse sentence and slate its function slept wherever darkness fell 5th July, 2001 underlined in each 6 He him 6 While we were learning it started...
- C Chemistry Summary indicating the formation of: • Oxides (Basics and Acids) • Oxygenated Acids. • Hydroxides. • Hydracids. • Binary and Ternary Salts...
- M Mathematics Express sin U as a fraction in simplest terms...
- C Chemistry Pablo, whose mass is 60 kg, is moving along at a velocity of 8 m/s. How much kinetic energy does he have?...
- E English In Better Wait Till Martin Comes, when the cats repeatedly pick up red hot coals, it proves that the cats are ordinary and will not harm John. it distracts the reader from worrying...
- M Mathematics Please help! It’s my last question!...
Ответ:
Ответ:
Here it the solution statement:
searchResult = strchr(personName, searchChar);
This statement uses strchr function which is used to find the occurrence of a character (searchChar) in a string (personName). The result is assigned to searchResult.
Headerfile cstring is included in order to use this method.
Explanation:
Here is the complete program
#include<iostream> //to use input output functions
#include <cstring> //to use strchr function
using namespace std; //to access objects like cin cout
int main() { // start of main() function body
char personName[100]; //char type array that holds person name
char searchChar; //stores character to be searched in personName
char* searchResult = nullptr; // pointer. This statement is same as searchResult = NULL
cin.getline(personName, 100); //reads the input string i.e. person name
cin >> searchChar; // reads the value of searchChar which is the character to be searched in personName
/* Your solution goes here */
searchResult = strchr(personName, searchChar); //find the first occurrence of a searchChar in personName
if (searchResult != nullptr) //if searchResult is not equal to nullptr
{cout << "Character found." << endl;} //displays character found
else //if searchResult is equal to null
{cout << "Character not found." << endl;} // displays Character not found
return 0;}
For example the user enters the following string as personName
Albert Johnson
and user enters the searchChar as:
J
Then the strchr() searches the first occurrence of J in AlbertJohnson.
The above program gives the following output:
Character found.