Given the class below, tell to what value the default constructor initializes the data member. Name this initialization technique and give another way to write the constructor.

```
class A
{
public:
A();
private:
int a;
};

A::A() : a(17)
{
//deliberately empty
}
```

This is a base (or member) initializer list, albeit a short one. The alternate way to initialize in this constructor follows.
```
A::A()
{
a = 17;
}
```

Computer Science & Information Technology

You might also like to view...

Comments in Alice are instructions for the computer to take into account while it is executing a program.

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

Computer Science & Information Technology

Match each item with a statement below.

A. Monitors the airwaves for any new devices or access points. B. A free, client-based network protocol analyzer. C. An enhanced Web scanner that, among other things, scans an entire Web site for valuable pieces of information, such as server names and e-mail addresses. D. Designed to crack WEP and WPA-PSK keys to allow packet sniffing and wireless network auditing. E. Uses incrementing Time-to-Live (TTL) packets to determine the path into a network as well as the default firewall policy. F. Uses ICMP to determine the remote OS. G. When run with the -sI switch, it allows you to bounce your scan across a firewall by using one of the idle DMZ hosts as the initiator of the scan. H. A UNIX or Linux systems support tool that allows a remote individual to "mirror" entire Web sites. I. A freeware tool that applies packet sniffing to wireless networks.

Computer Science & Information Technology