Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Wt are the Buses in C Language

3212


How can I find out how much free space is available on disk?

1049


How do you declare a variable that will hold string values?

1165


what are non standard function in c

1904


How many header files are in c?

1027


Can static variables be declared in a header file?

1058


What are header files why are they important?

1084


Tell me what are bitwise shift operators?

1130


What are the types of i/o functions?

1331


can we have joblib in a proc ?

2297


5 Write an Algorithm to find the maximum and minimum items in a set of ā€˜n’ element.

2100


What are valid signatures for the Main function?

1219


What is else if ladder?

1019


Explain what is the benefit of using #define to declare a constant?

1170


How can variables be characterized?

2182