Which of the following is true about classes and structs?

A. By default, all members of a struct are public and all members of a class are private.
B. A struct variable is passed by value only, and a class variable is passed by reference only.
C. An assignment operator is allowed on class variables, but not on struct variables.
D. You cannot use the member access specifier private in a struct.


Answer: A

Computer Science & Information Technology

You might also like to view...

What will the following code output?

``` int *numbers = new int[5]; for (int i = 0; i <= 4; i++) *(numbers + i) = i; cout << numbers[2] << endl; ``` a. five memory addresses b. 0 c. 3 d. 2 e. 1

Computer Science & Information Technology

How can you confirm what ink separations will print?

What will be an ideal response?

Computer Science & Information Technology

You are the administrator for your company, and you are looking at upgrading your Windows Server 2012 Standard with GUI to Windows Server 2016. Which version of Windows Server 2016 does Microsoft recommend you use to keep the GUI interface?

A. Windows Server 2016 Datacenter (Desktop Experience) B. Windows Server 2016 Standard (Desktop Experience) C. Windows Server 2016 Datacenter D. Windows Server 2016 Standard

Computer Science & Information Technology

A(n) _____ search typically generates thousands of hits and requires a review of multiple webpages to gather appropriate information.

A. stop word B. open-ended C. full-text D. targeted

Computer Science & Information Technology