Which of the following can be virtual?

a) Constructors
b) Destructors
c) Ordinary functions
d) Friend functions
e) Static functions


b) Destructors , and c) Ordinary functions

Part a) is wrong. The virtual keyword may not be applied to any constructor. Part d) is wrong. Functions that are friends cannot be virtual, since they are not class members. Part e) is wrong. The fact that virtual functions are called through an object contradicts the function’s static nature. (A static function is associated with the class, not any object).

Computer Science & Information Technology

You might also like to view...

What are the two main factors that affect how smooth the animation is in the Rebound program? Explain how changing either would affect it.

What will be an ideal response?

Computer Science & Information Technology

Suppose the file is ordered by the key field SSN and we want to construct a primary index on SSN. Calculate (i) the index blocking factor bfr i (which is also the index fan-out fo); (ii) the number of first-level index entries and the number of first-level index blocks; (iii) the number of levels needed if we make it into a multi-level index; (iv) the total number of blocks required by the multi-level index; and (v) the number of block accesses needed to search for and retrieve a record from the file--given its SSN value--using the primary index.

Consider a disk with block size B=512 bytes. A block pointer is P=6 bytes long, and a record pointer is P R =7 bytes long. A file has r=30,000 EMPLOYEE records of fixed-length. Each record has the following fields: NAME (30 bytes), SSN (9 bytes), DEPARTMENTCODE (9 bytes), ADDRESS (40 bytes), PHONE (9 bytes), BIRTHDATE (8 bytes), SEX (1 byte), JOBCODE (4 bytes), SALARY (4 bytes, real number). An additional byte is used as a deletion marker.

Computer Science & Information Technology

Transcripts do not affect traffic to your website.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology

A systems administrator needs to configure the company's web server to authenticate using PKI certificates. Which of the following servers would be queried to validate user credentials?

A. DHCP server B. DNS server C. Certificate authority D. ACL on web server E. LDAP server

Computer Science & Information Technology