Which of the following references to an individual field within a structure through a pointer is semantically correct but logically incorrect.

A. *ptr.x
B. *ptr
C. (*ptr).x
D. ptr->x


Answer: A

Computer Science & Information Technology

You might also like to view...

Which statement is false?

a. With datagram sockets a process establishes a connection to another process. b. The TCP protocol is used for transmission with stream sockets. c. The UDP protocol is used for transmission with datagram sockets. d. With the UDP protocol packets can be lost, duplicated or even arrive out of sequence.

Computer Science & Information Technology

A(n) ________ encloses the objects in a group as one unit

A) dotted border B) moving marquee C) solid border D) set of sizing handles

Computer Science & Information Technology

Which of the following algorithms is stable?

A. merge sort B. shell sort C. quick sort D. straight insertion sort

Computer Science & Information Technology

Both Windows and Unix include permission flags in their file security mechanisms

a. true b. false

Computer Science & Information Technology