1. Given the following code: What will print out on the console? (Points : 1) yo
ID: 3660658 • Letter: 1
Question
1. Given the following code: What will print out on the console? (Points : 1) you do this test 2. Which of the following statements are true? (Points : 1) bad comments can be worse than no comments comments are useful for writing notes for explanations in your code for both yourself and others comments are stripped out during the compilation process all of the above 3. What are two types of array searches? (Points : 1) integer and string linear and binary integer and binary linear and string 4. Which of the following lines of code will start the search at the 5th position (Points : 1) location = field.find("search", 4); location = field.find("search". 5); location = field.find("search", 6); none of the above 5. Which array search is the most efficient? (Points : 1) binary integer linear string 6. Fill in the blanks. ++lives demonstrates the ______, while lives++ demonstrates the ______. (Points : 1) firstplus, lastplus beginning, ending continue, break prefix, postfix 7. Which of the following is not a valid C++ variable type? (Points : 1) char integer bool long 8. Fill in the blanks. We need to include the ______ header file to use std:cout and std::cin, and we need to include the _______ header file to use std::string. (Points : 1) standard library catlib, catdio iostream, string coutcin, string 9. Which type of looping structure is best suited for "The Game Loop?" (Points : 1) do while for loopty 10. What are two types of array sorts? (Points : 1) binary and bubble selection and string bubble and selection binary and string 11. When using the find() member function, what field should be checked to see that there was something found? (Points : 1) string::found string::npos string::notfound string::cantfind 12. What is the purpose of the STL? (Points : 1) To provide lazy programmers a job It is the Superior Tangential Limiting tool for arrays. To Provide access to powerful programming tools To bring the power of teamwork together in programming (Simple Teamwork Library) 13. Which of the following is NOT an STL container? (Points : 1) array algorithms iterators vectors 14. Which of the following is known as a dynamic array? (Points : 1) algorithm multi-dimensional array multi-tonal array vector 15. Which of the following declares a vector consisting of integers, named population? (Points : 1) #define integer population; #include integer population; vector population; vector population; 16. Write the code to add the new element "candy" to the end of a vector of strings named "delights." (Points : 2) 17. If you had a vector containing "popcorn," "peanuts," and "cotton candy," what would the size() member function return? (Points : 1) 0 1 2 3 18. Which of the following would add "window" to the end of the "building" vector? Assume that the "building" vector already contains five elements. (Points : 1) building[4] = "window"; building[5] = "window"; building.size() building.push_back("window"); 19. Which of the following removes the last element of a vector? (Points : 1) clear() clear(last) empty() pop_back() 20. After the following code executes, what will the value of classes[1] be? (Points : 1) Visual Basic C++ Alice Innovations None of the above, you can't access a vector using []. 21. After the following code executes, what will the value of classes[3] be? (Points : 1) Innovations Flash Alice This code would throw an error. 22. After the following code is executed, what will the value of classes[4] be? (Points : 1) Innovations Flash This code causes a complier error. This code causes a run-time error. 23. In vector processing, how does myvector.size() differ from myvector.capacity()? (Points : 1) There is no difference. Both statements will return the same value. myvector.size() is used for arrays, and myvector.capacity is used for vectors myvector.size() returns the current number of elements in the vector while myvector.capacity() returns the amount of space left before memory reallocation There is no such thing as the capacity() member function. 24. Given the follwing code that will loop through a vector with iter defined as a const_iterator: What is the correct statement that needs to be coded next in order to print out the contents of the vector? (Points : 1) { 25. Given the following code: What will print on the output console? (Points : 1) Nothing. Nothing. Code is invalid. Found it. Where did it go? 26. Given the following code: Which of the following will place the weather vector in a random order? (Points : 1) seq_shuffle(weather.begin(), weather.end()); random_shuffle(weather.begin(), weather.end()); randomly_shuffle(weather.begin(), weather.end()); You cannot sort vectores randomly. 27. Which of the following is NOT a valid algorithm> (Points : 1) find() random() random_shuffle() sort() 28. Let's say you have a vector defined, and it contains 10 elements. What statement will change the vector capacity to 35, once it has already been defined? (Points : 1) myVector.capacity(35); myVector.reserve(35); myVector.size(35); myVector.updatesize=35; 29. Fill in the blanks: Adding to or deleting from the end of a vector is very efficient. To add a record at another place, use the _____ member function. To delete a record at a place other than the end, use the _____ member function. (Points : 1) add, delete insert, delete insert, erase add, erase 30. Which of the following is NOT a valid STL Container? (Points : 1) list map queue stacker 31. Fill in the blank. _____________ is a process that helps code the logic of the program where each pass gets more detailed. (Points : 1) stepwise refinement pseudocode flowcharting agile and scrum 32. Fill in the blanks. A function returns a _____ of a given type. If it doesn't need to return a value, you need to place _____ instead of a variable type in the function declaration. (Points : 1) field, forget variable, void base, omit value, void 33. Which of the following is a valid function prototype? (Points : 1) int FindValue(num1, num2, num3); int FindValue(int num1 = 0, int num2= 0, int num3); int FindValue(int num1, int num2, int num3); int FindValue(void); 34. Function prototypes are NOT required when using a function. (Points : 1) True False 35. How would you CALL a function that was named "translate" and required two string parameters? (Points : 1) translate(); translate(string "One", string "Two:) translate(string "One", string "Two:); translate(one, two); 36. What is the scope of a variable? (Points : 1) another word for "refresh" where the variable can be seen in your program a code versioning system used to speed up variable development What are you talking about? Scope is only a mouthwash! 37. Given the following code: What is the value displayed to the console? (Points : 1) 1 2 3 Impossible to tell -- not enough information 38. What is the process called when you allow a function to accept multiple sets of arguments? (Points : 1) argumentative functional overridable overloading 39. What is the main purpose of function inlining? (Points : 1) avoid having to jump to the function code everytime it is called speed up the compiler utilize 64-bit systems to prepare the program to split between header and implementation classes 40. What is the purpose of classes? (Points : 1) to implement OOP in C++ to extend the C++ language to confuse the general public job security 41. How do you define a class named Graduation (Points : 1) Graduation Class Class Graduation graduation class class Graduation 42. What is it called when you crate an object from a class? (Points : 1) birth creation encapsulation instantiation 43. What is the purpose of a constructor in a class definition? (Points : 1) to initialize some data members to build the class within the program to preceed the int main() function with a class there is no such thing as a constructor 44. What is the purpose of a class encapsulator? (Points : 1) encapsulation class definition it is a springboard to stepwise refinement there is no such thing as a class encapsulator 45. Fill in the blank. Member acces is _____ by default. (Points : 1) classless private public void 46. What is NOT a purpose of a constant member function? (Points : 1) to remain constant it can't modify a data member of its class it keeps you from altering a data member accidentally it makes your intentions clear to other programmers 47. What is the purpose of a static data member? (Points : 1) it changes each time the class is run it retains the value in the class it is a tightly scoped variable it is an efficient means of error detection 48. Fill in the blank, The ultimate goal when using classes is to create seperate _____ and _____ files to hold class information. (Points : 1) prototype, definition header, implementation source code, object code translated, compiled 49. What preprocessor compiler directive is used to prevent multiple definitions when using seperate class files? (Points : 1) #ifndef #include #include #include 50. Fill in the blanks: It is a general rule to make data members _____ and methods _____. (Points : 1) private, private public, public private, public public, privateExplanation / Answer
can u plsss repost the question the data is not clear.......
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.