📖 Samacheer Kalvi · 11th TN - English Medium · Computer Science · Page 239question

Unit IV · Part 10

Chapter 3: 4 · Computer Science

A member function can call another member function directly, without using the dot operator called as (A) sub function (B) sub member (C) nesting of member function (D) sibling of member function . The member function defined within the class behave like ........ functions (A) inline (B) Non inline (C) Outline (D) Data . Which of the following access specifier protects data from inadvertent modifications?

(A) Private (B) Protected (C) Public (D) Global . class x int y; public: x(int z){y=z;} } x1[ ]; int main() { x x2( ); return ;} How many objects are created for the above program (A) (B) (C) (D) . State whether the following statements about the constructor are True or False. i) constructors should be declared in the private section.

ii) constructors are invoked automatically when the objects are created. (A) True, True (B) True, False (C) False, True (D) False, False Hands on practice: Define a class Employee with the following specification private members of class Employee empno- integer ename – characters basic – float netpay, hra, da, - float calculate () – A function to find the basic+hra+da with float return type public member functions of class employee havedata() – A function to accept values for empno, ename, basic, hra, da and call calculate() to compute netpay dispdata() – A function to display all the data members on the screen

Related topics

Have a question about this topic?

Get an AI answer grounded in your actual textbook — with the exact page reference.

Ask AI about this topic →