What will be the output of the program include include main

What will be the output of the program? #include #include main() {char str 1 [] = \"Hello\"; char str2[]-\"hello\"; if(strcmp(str1, str2) =0) cout

Solution

Answer - Unequal

Notice that the strcmp() function is passed two arguments that correspond to the two strings you want to compare. It performs a case-sensitive lexicographic comparison of the two strings and returns one of the following values:


Return Value Meaning
less than 0 - first string < second string.
equal to 0 - first string == second string.
greater than 0   -   first string > second string.

Thanks.

Happy Chegging

 What will be the output of the program? #include #include main() {char str 1 [] = \

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site