تبلیغات
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی - پیدا کردن زیر رشته در سی پلاس
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی
دانلود رایگان سورس پروژه
سایت برنامه نویسی تک کدر takcoder.ir


آموزش برنامه نویسی با استفاده از نوین ترین روش و ارائه پروژه های نمونه و مجموعه عظیم سورس کدهای آماده برای شما دوستان

مدیر سایت : Yahya Taherzadeh
نویسندگان
نظرسنجی
زبان برنامه نویسی مورد علاقه شما؟






برنامه در خواستی :دو رشته از ورودی بگیرد، رشته دوم را در رشته اول پیدا کرده و اندیس شروع را برگردد اگر چند تا بود اولی را برگردد ، اگر نبود1 -  برگردد.


برای مشاهده تابع این برنامه موجود در سی پلاس کلیک کنید

 همین برنامه با دستورات سی
#include <iostream.h>
#include <conio.h>

void main()
{
     char c1[99]={0}, c2[99]={0};
     int c, no=0,index=-1;
     cout<<"Enter the fisrt string: ";
     cin.get(c1,99);
     cout<<"Enter the search pattern: ";
     cin>>c2;
     for(int i=0;c1[i]!=0;i++)
          for(c=0;;c++, i++)
          {
                if(c2[c+1]==0&&c2[c]==c1[i])
                {
if(index==-1)
index=i;
                     no++;
                     break;
                }
                else if(c2[c]==c1[i])
                     continue;
                else
                     break;
          }
     cout<<"Tekrar shode: "<<no<<" time(s)!\n";
cout<<"shoroee index: "<<index<<endl;
}





نوع مطلب : تیکه کد، سی| سی پلاس پلاس، آموزش، برنامه| پروژه های درخواستی، 
برچسب ها : یافتن زیر رشته، یافتن زیر رشته درون رشته، جستجوی زیر رشته، جستجوی زیر رشته در سی پلاس، رشته ها در سی، آموزش رایگان برنامه نویسی، آموزش،
لینک های مرتبط :
Yahya Taherzadeh
پنجشنبه 21 آذر 1392
شنبه 19 آبان 1397 07:22 ق.ظ
I have been browsing online more than 4 hours today, yet I never found any interesting article like yours.
It's pretty worth enough for me. Personally, if all website owners and bloggers made good content as
you did, the web will be much more useful than ever before.
چهارشنبه 16 آبان 1397 03:06 ق.ظ
Today, while I was at work, my sister stole my iphone and tested
to see if it can survive a 40 foot drop, just so she can be a youtube sensation. My apple
ipad is now broken and she has 83 views. I know this is entirely off topic but I had to share it with
someone!
سه شنبه 8 آبان 1397 07:05 ق.ظ
I absolutely love your blog and find most of your post's
to be exactly I'm looking for. can you offer guest writers to write content for you?
I wouldn't mind publishing a post or elaborating on some of the subjects you
write related to here. Again, awesome blog!
شنبه 5 آبان 1397 06:49 ب.ظ
It is perfect time to make some plans for the future and it is
time to be happy. I have read this post and if I could I want to suggest you some
interesting things or tips. Perhaps you could write next articles referring to
this article. I want to read more things about it!
پنجشنبه 3 آبان 1397 01:22 ق.ظ
Touche. Solid arguments. Keep up the good effort.
چهارشنبه 2 آبان 1397 11:33 ب.ظ
I simply could not depart your website before suggesting that I actually enjoyed
the usual info a person supply in your visitors?
Is going to be back regularly in order to inspect new posts
سه شنبه 24 مهر 1397 09:11 ب.ظ
Very good article! We will be linking to this great
content on our website. Keep up the great writing.
چهارشنبه 18 مهر 1397 10:46 ق.ظ
Great article.
سه شنبه 17 مهر 1397 02:52 ب.ظ
We're a bunch of volunteers and starting a new scheme in our community.
Your website offered us with valuable info to work on.
You've performed an impressive process and our whole neighborhood can be grateful to you.
دوشنبه 16 مهر 1397 08:10 ب.ظ
Because the admin of this web page is working, no uncertainty very rapidly it
will be well-known, due to its feature contents.
سه شنبه 10 مهر 1397 08:26 ق.ظ
Hey there! Quick question that's completely off topic. Do you know how to make your site mobile friendly?

My website looks weird when browsing from my apple iphone.
I'm trying to find a theme or plugin that might be
able to resolve this problem. If you have any recommendations, please
share. Many thanks!
دوشنبه 9 مهر 1397 08:34 ب.ظ
Good site you have here.. It's hard to find high quality writing like yours nowadays.
I truly appreciate people like you! Take care!!
دوشنبه 9 مهر 1397 09:32 ق.ظ
Its like you read my mind! You seem to know so much about this, like you wrote the book in it or something.

I think that you can do with a few pics to drive the message home a little bit, but other than that,
this is great blog. A fantastic read. I'll certainly be back.
دوشنبه 9 مهر 1397 04:16 ق.ظ
Wonderful post! We will be linking to this particularly great post on our
website. Keep up the great writing.
دوشنبه 9 مهر 1397 12:25 ق.ظ
I really love your blog.. Great colors & theme.
Did you make this site yourself? Please reply back as I'm attempting to create my own blog and
would like to find out where you got this from or
just what the theme is called. Thanks!
سه شنبه 27 شهریور 1397 02:53 ب.ظ
Outstanding post however , I was wanting to know if you could write a litte more on this subject?
I'd be very thankful if you could elaborate a little bit more.
Thank you!
جمعه 23 شهریور 1397 12:17 ب.ظ
I don't know whether it's just me or if perhaps everyone
else encountering problems with your site. It appears like some of
the written text in your content are running off the screen. Can somebody
else please comment and let me know if this is happening to
them as well? This might be a issue with my internet browser because I've had this happen before.
Many thanks
پنجشنبه 15 شهریور 1397 01:21 ب.ظ
What's up Dear, are you really visiting this site regularly, if so afterward you will absolutely obtain pleasant experience.
چهارشنبه 14 شهریور 1397 04:25 ب.ظ
Spot on with this write-up, I actually believe this website needs a lot more attention. I'll
probably be back again to read more, thanks for the info!
پنجشنبه 25 مرداد 1397 01:01 ب.ظ
You can do lots of very useful things in the best way of getting a straight edge on wire, tube and sheet.
چهارشنبه 24 مرداد 1397 08:04 ب.ظ
Classic jewelry from Coro or Napier may be the approach to
go for you. Here is the most effective identified and most
popular perception.
چهارشنبه 24 مرداد 1397 07:42 ب.ظ
One of the most frustrating issues about using recycled supplies is that everybody thinks it's trash till you have completed putting it together.
چهارشنبه 24 مرداد 1397 07:15 ب.ظ
Moreover, they are low cost on gas and easy to park. Many a occasions, this gem is heated to give it an old or aged
look.
چهارشنبه 24 مرداد 1397 07:10 ب.ظ
Facebook Graph Research does not allows strangers, or the general public to see your own personal
photos and personal data until you ensure it is indexed.
چهارشنبه 24 مرداد 1397 07:06 ب.ظ
I haven't also hit Minnesota yet!
چهارشنبه 24 مرداد 1397 07:03 ب.ظ
Authority locally of expertise provides more reach.
چهارشنبه 24 مرداد 1397 06:36 ب.ظ
It only makes the specific situation even worse.
چهارشنبه 24 مرداد 1397 06:27 ب.ظ
Celtic designs are in style for its gold rings with knotted designs.
Set up a torch station with some landscaping bricks.
چهارشنبه 24 مرداد 1397 05:48 ب.ظ
Wonderful blog! I found it while searching on Yahoo News.
Do you have any tips on how to get listed in Yahoo News?
I've been trying for a while but I never seem to get there!
Appreciate it
سه شنبه 21 فروردین 1397 02:45 ب.ظ
Life requires laughter, laughter needs life.
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر


نمایش نظرات 1 تا 30


صفحات جانبی
آمار وبلاگ
تاییدیه پرداخت
تبلیغات
به سایت تک کدر خوش آمدید