QUESTION 45 The statement typedef int oneDArr ay 20 does which of the following?
ID: 3840362 • Letter: Q
Question
QUESTION 45 The statement typedef int oneDArr ay 20 does which of the following? O creates an array of 20 integers o makes oneDArray a copy of another 20-integer array O makes oneDArray an alias for a data type that holds 20 integers O creates a one-dimensional integer array with all elements initialized to 20 none of the above QUESTION 46 When an object instance is passed to a function as a constant reference o the function accesses the original object, rather than a copy of it. o the function cannot make any changes to the member variables. o it is more efficient than passing it by value. all of the above are true. O A and B are true, but not C QUESTION 47 The following statement adds a new element to the department vector at index 25:department.push back(25 True False QUESTION 48 Assuming employee is an array of objects with a public member function named setHourlywage, the following statement correctly calls this method for employee12]. employee setHourlyilage[2] (20.00); True False QUESTION 49 A copy constructor is used when objects are passed by reference. True False QUESTION 50 If iter is an iterator for a map of type napkint, string>, the type of the expression iter- second is QUESTION 51 Write the destructor prototype for the class Station.Explanation / Answer
Q45-none of these as in this statement we are giving the type int another name which can be used for it later in the program.
Q46-All of the above are true.
Q47- False it will add element 25 after the position where last element was inserted.
Q48-True this is the correct method to call this method.
Q49- FALSE as copy constructor is called when objects are passed bby value or returned by value.
Q51-~Station();
Q39-starting memory address of the array as it is a pointer passed with pointing to the first memory address of the array.
Q40-True as the pointer is passed to the first element of the array we can directly make changes in the array by accessing the elements at their addresses.
Q41-A table with rows and coloumns.
Q42-False as an array is a homogeneous collection of data which means it can store only 1 type of data whether it is a one dimentional array or 2-d array.
Q43-none of the above to display array with 10 elements it is done as for(int i=0;i<10;i++){cout<<arr[i];}
Q44-the array cannot be created with out a size declarator it can be empty but for an array it shoukd have an array declarator.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.