Which of the following is correct regarding presence and behavior of constructor is correct. Assume that the class name is C.

a) To use the declaration, C x; requires a default constructor must be present.
b) To invoke the default constructor, the syntax must be C x();
c) A constructor is called automatically when you declare an object of class type, but
any constructor can be called after declaration to set all the member variables to a
known state.
d) An explicit call to a constructor creates an anonymous object, which can be
assigned.
e) In spite of the fact that a constructor appears to be a member function, a
constructor may not be called as if it were a member function


a) To use the declaration, C x; requires a default constructor must be present. , c) A constructor is called automatically when you declare an object of class type, but
any constructor can be called after declaration to set all the member variables to a
known state. , d) An explicit call to a constructor creates an anonymous object, which can be
assigned. , and e) In spite of the fact that a constructor appears to be a member function, a
constructor may not be called as if it were a member function

b) defines a function that takes no arguments and returns class C object.
Part c) is right as far as it goes. It should mention that the constructor may not be
called as if it were a member function; rather, it must be called to generate an
anonymous object, which is assigned to change the state of an object.

Computer Science & Information Technology

You might also like to view...

Accepting February 29 for input only in a leap year is a check that should be caught by a __________ check.

a. date b. time c. day d. reasonableness

Computer Science & Information Technology

Formulate the following queries using SQL:

Consider the following relational schema: Staff (staffNo, name, dept, skillCode) Skill (skillCode, description, chargeOutRate) Project (projectNo, startDate, endDate, budget, projectManagerStaffNo) Booking (staffNo, projectNo, dateWorkedOn, timeWorkedOn) where: Staff contains staff details and staffNo is the key. Skil contains descriptions of skill codes (e.g. Programmer, Analyst, Manager, etc.) and the charge out rate per hour for that skill; the key is skillCode. Project contains project details and projectNo is the key. Booking contains details of the date and the number of hours that a member of staff worked on a project and the key is staffNo/projectNo. (a) (1) List all skills with a charge out rate greater than ?60 per hour, in alphabetical order of description. (2) List all staff with the skill description ‘Programmer’ who work in the ‘Special Projects’ department. (3) For all projects that were active in July 1995, list the staff name, project number and the date and number of hours worked on the project, ordered by staff name, within staff name by the project number and within project number by date. (4) How many staff have the skill ‘Programmer’? (5) List all projects that have at least two staff booking to it. (6) List the average charge out rate. (7) List all staff with a charge out rate greater than the average charge out rate. (b) Create a view of staff details giving the staff number, staff name, skill description, and department, but excluding the skill number and charge out rate.

Computer Science & Information Technology

____________________ points draw continuous curves.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

____ is a type of scam that uses spoofed domain names to obtain personal information for use in fraudulent activities.

A. Framing B. Fishing C. Pharming D. Farming

Computer Science & Information Technology