A community for students. Sign up today!
Here's the question you clicked on:
 0 viewing
 2 years ago
Assuming that string1 = "hello" and string2 = "hello world", Which of the following returns 0?
A strcmp (string1, string2);
b strcmp (string1, string2, 6);
c strncmp (string1, string2, 6);
d strncmp (string1, string2, 5);
 2 years ago
Assuming that string1 = "hello" and string2 = "hello world", Which of the following returns 0? A strcmp (string1, string2); b strcmp (string1, string2, 6); c strncmp (string1, string2, 6); d strncmp (string1, string2, 5);

This Question is Closed

shahzadjalbani
 2 years ago
Best ResponseYou've already chosen the best response.0strcmp(string1,string2) is a function which compares two functions if the value of string1 is less than string2 function will return 0 if the value of string1 and string2 are equal function will return 0; if the value of string1 is greater than string2 function will return value greater than 0.

shahzadjalbani
 2 years ago
Best ResponseYou've already chosen the best response.0how it would be A.

shahzadjalbani
 2 years ago
Best ResponseYou've already chosen the best response.0A will return negative value.

zordoloom
 2 years ago
Best ResponseYou've already chosen the best response.0Oh, ok In this case it has to be d, correct?
Ask your own question
Ask a QuestionFind more explanations on OpenStudy
Your question is ready. Sign up for free to start getting answers.
spraguer
(Moderator)
5
→ View Detailed Profile
is replying to Can someone tell me what button the professor is hitting...
23
 Teamwork 19 Teammate
 Problem Solving 19 Hero
 Engagement 19 Mad Hatter
 You have blocked this person.
 ✔ You're a fan Checking fan status...
Thanks for being so helpful in mathematics. If you are getting quality help, make sure you spread the word about OpenStudy.