Which of the following function is more appropriate for reading in a multi-word

Home | Discussion Forum
Taiyari24Hour

Which of the following function is more appropriate for reading in a multi-word string?



View More Related Question

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

3) What is the output of this C code?

#include <stdio.h>
#include <string.h>
int main()
{
char *str = "hello, world";
char str1[9];
strncpy(str1, str, 9);
printf("%s %d", str1, strlen(str1));
}

4) Which is more appropriate for reading in multi-word string?

5) 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");
}

UP Gk Online Test

taiyari24hour.com

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