program to locate string with in a string with using strstr
function
Answer Posted / pradeep
#include<stdio.h>
#include<string.h>
void main()
{
char *str1,*str2,*ptr;
printf("Enter string1:");
scanf("%s",&str1);
printf("Enter string2:");
scanf("%s",&str2);
ptr=strstr(str1,str2);
if(ptr==0)
printf("String not located");
else
printf("string located are %s",ptr);
}
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
Describe static function with its usage?
Explain output of printf("Hello World"-'A'+'B'); ?
Write a program of advanced Fibonacci series.
Why is structure important for a child?
Why is c still so popular?
What is malloc() function?
which of the following is not a character constant a) 'thank you' b) 'enter values of p, n ,r' c) '23.56E-o3' d) all of the above
How does sizeof know array size?
What is c variable?
What are type modifiers in c?
i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....
What is bin sh c?
Write a program of prime number using recursion.
What is auto keyword in c?
What is void main () in c?