What is the difference between the spaceship operator(<=>) and the strcmp() function?

Posted by: Pdfprep Category: 200-710 Tags: , ,

What is the difference between the spaceship operator(<=>) and the strcmp() function?
A . There is no difference in functionality
B . strcmp() returns a Boolean value, the spaceship operator a number
C . strcmp() does a case-intensive comparison, the spaceship operator does not
D . The spaceship operator returns -1, 0 or 1; strcmp() may return any integer

Answer: D

Leave a Reply

Your email address will not be published.