D
Dhruv Ahuja
Consider:
printf("%d", "ABC" == "ABC");
The ANSI standard says that string comparsion using a comparison
operator (==) is not allowed. It recommends the use of the strcmp() in
<string.h>.
The Borland compiled programs print "0" on this; while the GCC and MS
VC++ compiled programs print "1".
Which compiler, would you say, returns the most appropriate answer,
not forgetting what the ANSI recommends...
printf("%d", "ABC" == "ABC");
The ANSI standard says that string comparsion using a comparison
operator (==) is not allowed. It recommends the use of the strcmp() in
<string.h>.
The Borland compiled programs print "0" on this; while the GCC and MS
VC++ compiled programs print "1".
Which compiler, would you say, returns the most appropriate answer,
not forgetting what the ANSI recommends...