Got Homework?
Connect with other students for help. It's a free community.
Here's the question you clicked on:
 0 viewing
zordoloom
Group Title
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);
 one year ago
 one year ago
zordoloom Group Title
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);
 one year ago
 one year ago

This Question is Closed

shahzadjalbani Group TitleBest ResponseYou've already chosen the best response.0
strcmp(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.
 one year ago

zordoloom Group TitleBest ResponseYou've already chosen the best response.0
So tis A?
 one year ago

shahzadjalbani Group TitleBest ResponseYou've already chosen the best response.0
how it would be A.
 one year ago

shahzadjalbani Group TitleBest ResponseYou've already chosen the best response.0
A will return negative value.
 one year ago

zordoloom Group TitleBest ResponseYou've already chosen the best response.0
Oh, ok In this case it has to be d, correct?
 one year ago
See more questions >>>
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.