If the two strings are identical, then strcmp() function returns

Home | Discussion Forum
Taiyari24Hour

If the two strings are identical, then strcmp() function returns



View More Related Question

2) The library function used to find the last occurrence of a character in a string is

3) How will you print \n on the screen?

4) What is the output of this C code?

#include <stdio.h>
int main()
{
char *str = "hello, world";
char *str1 = "hello, world";
if (strcmp(str, str1))
printf("equal");
else
printf("unequal");
}

5) What is the output of this C code?

#include <stdio.h>
int main()
{
char *str = "hello";
char str1[5];
strcpy(str, str1);
printf("%s", str1);
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.