subject

What does the following code do?

#include
#include
#include
using namespace std;

//Function Prototype Declaration

bool seqsearch(vectorlist, string str);
void main()
{
//variable declaration
vectorlist;
string s, ser_str;
bool found;
int i, n;

//inputting the number of strings
cout << "Enter number of strings: ";
cin >> n;

//inputting strings into vector "list"

for (i=0; i {
cin >> s;
list. push_back(s);
}
cout << "Enter string to be searched: ";
cin >> ser_str;

//function call
found=seqsearch(list, ser_str);
if(found)
cout << "String found in Vector " << endl;
else
cout << "String not found in Vector." << endl;
system("pause");
} // end main
//Function Definition

bool seqsearch(vectorlist, string str)
{
bool found=false;
int i;
for (i=0; i {
if(list[i]==str)
{ found=true;
break;
}
}
return found;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The isometric projection camera technique provides an illusion of perspective by using things like parallax scrolling to create the illusion of 3d in a 2d game
Answers: 3
question
Computers and Technology, 23.06.2019 21:30
Which of the following includes the three primary network access technologies? dsl, cable modem, broadband lan, wan, man voip, uc, iptv tcp/ip, ftp, dhcp
Answers: 2
question
Computers and Technology, 23.06.2019 21:30
Examine the list below. which factors positively affect lifetime income? check all that apply.
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Pseudocode pld #6, pg. 117 start// declarations// number numbertoguess// number myguess; numbertoguess = 92// while myguess ! = numbertoguess// output " guess an integer number between 1 and 100"// input myguess// if (myguess == numbertoguess)// output "you guessed the correct number"// else// output "the number you guessed was incorrect. try again! "// end if// end while// output " for playing the guessing game. have a great day! "// stop
Answers: 3
You know the right answer?
What does the following code do?

#include
#include
#include
using nam...
Questions
question
Mathematics, 22.03.2021 19:30
question
Mathematics, 22.03.2021 19:30
question
Mathematics, 22.03.2021 19:30
question
Mathematics, 22.03.2021 19:30
question
Mathematics, 22.03.2021 19:30