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

1. Inline functions are always more efficent than noninline functions.
2. A static variable of a class cannot be changed.
3. size and capacity of a vector are two names for the same thing.
4. Assignment behaves essentially the same for vectors as for arrays.

1. False
For larger functions inline can be less efficient.
2. False
The static member can be accesses and assigned as
ClassName::staticMember = 17.0; //if the type is double
3. false
the size member function returns the number of elements inserted in the vector. The capacity member function returns the number of elements that a vector can hold without requiring reallocation.
4. false
There is no assignment for arrays. The programmer must carry out the copy member by member.

Computer Science & Information Technology

You might also like to view...

A user connects to a wireless network at the office and is able to access unfamiliar SMB shares and printers. Which of the following has happened to the user?

A. The user is connected using the wrong channel. B. The user is connected to the wrong SSID. C. The user is experiencing an EMI issue. D. The user is connected to the wrong RADIUS server.

Computer Science & Information Technology

What is measured by an algorithm’s growth rate?

What will be an ideal response?

Computer Science & Information Technology