Test 2: 4/3/2018 CoSC113.101 is used before the array declaration in a function
ID: 3699690 • Letter: T
Question
Test 2: 4/3/2018 CoSC113.101 is used before the array declaration in a function heading to (True /False) 7. The word prevent the function from modifying the array. 8. A class is an example of a structured data type 9. Given this declaration: class myClass ( void print): //Output the value of x; MyClass): private: myClass myObject The following statement is legal. (True / False) myObject. 10; 10. If an object is declared in the definition of a member function of the class, then the object can access both the public and private members of the class (True/False) 11. If an object is created in a user program, then the object can access both the public and private (True/False) 12. You can use arithmetic operators to perform arithmetie operations on class objects. True/False) (True/False) (True False) members of the class. 13. As parameters to a function, class objects can be passed by reference only 14. The public members of a class must be declared before the private members. 15. Which of the following class definitions is correct in C++? a. class studentType b class studentType public: public: void setDatalstring, double, int); void setData(string, double, int); void print) const; private: string name private: string name; double gpa; c. class studentType d. studentType class public void setData(string, double, int); private string name; public: void setData(string, double, int); private: string name; 16. In C++, the __ is called the member access operator. a. b. c. d' # 17. A class object can beThat is, it can be created once, when the control reaches its declaration. and destroyed when the program terminates. a. static To guarantee that the member variables of a class are initialized, you use a. accessor b. automatic c. local d. public 18. b. mutator d. destructorExplanation / Answer
If you post more than 1 question, as per chegg guidelines I ahve to solve only first question.
Ques 7 . Answer : const
If we use const, before any variable , then its value is fixed and can't be changed.
Ques 8. True
A class is a structured data type. It is a structure in which we define various attributes and methods to perform some task.
Ques 9. The statement is not legal.
It is because x is a private attribute, so it can't be accessed outside the class directly.
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.