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

Home | Discussion Forum

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

View More Related Question

1) What will be the output of the program ?

  #include<stdio.h>
int main()
{
printf("Study 2 Online", " C Language MCQ\n");
return 0;
}

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

3) 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);
}

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

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

UP Gk Online Test

taiyari24hour.com