static char s2="Catbert";
static char s3= "Ratbert";
what is the vvalue of strcmp(s2, s3)<0 "Please explain"
Jump to Post
int strcmp (const char *s1, const char *s2) - the strcmp function compares the string s1 against s2, returning a value that has the same sign as the difference between the first differing pair of characters (interpreted as unsigned char objects, then promoted to int).
In your case, "C" < …
All 2 RepliesReply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.