Write a function named string_equal that returns 1 if its two string arguments match exactly and returns 0 otherwise.

What will be an ideal response?

```
int
string_equal(const char *str1, const char *str2)
{
return (strcmp(str1, str2) == 0);
}
```

Computer Science & Information Technology

You might also like to view...

Which IEEE 802.1X component checks the credentials of a device wanting to gain access to the network?

a. Supplicant b. Authentication server c. Access point d. Authenticator

Computer Science & Information Technology

What will be the values of ans, x, and y after the following statements are executed?

``` int ans = 35, x = 50, y = 50; if (x >= y) { ans = x + 10; x -= y; } else { ans = y + 10; y += x; } ``` a. ans = 60, x = 0, y = 50 b. ans = 45, x = 50, y = 0 c. ans = 45, x = 50, y = 50 d. ans = 60, x = 50, y = 100

Computer Science & Information Technology