What does the following code do?
#include
#include
#include
using nam...
Computers and Technology, 19.05.2020 22:17 princessa15266
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;
}
Answers: 2
Computers and Technology, 22.06.2019 05:00
Are special characters that allow you to search for multiple words at the same time.
Answers: 2
Computers and Technology, 24.06.2019 15:30
George is working as a programming team lead. which statements correctly describe the skills that he requires?
Answers: 3
Computers and Technology, 24.06.2019 18:20
7. design a circuit with three inputs (x, y, and z) representing the bits in a binary number, and three outputs (a, b, and c) also representing bits in a binary number. when the input is 1, 2, or 3, the binary output should be one lesser than the input. when the input is 4, 5, or 6, the binary output should be one greater than the input. when the input is 0, the output is 0, and when the input is 7, the output is 7. show your truth table, all computations for simplification, and the final circuit.
Answers: 2
Computers and Technology, 24.06.2019 23:50
Which career involves analyzing various factors that influence the customer decision-making process? analyze various factors that influence the customer decision-making processes. reset next
Answers: 2
Mathematics, 24.03.2020 00:09
Mathematics, 24.03.2020 00:10
Chemistry, 24.03.2020 00:10
Computers and Technology, 24.03.2020 00:10
History, 24.03.2020 00:10
Mathematics, 24.03.2020 00:10
Biology, 24.03.2020 00:10