تبلیغات
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی - پیدا کردن زیر رشته در سی پلاس
دانلود سورس پروژه های مختلف برنامه نویسی، آموزش برنامه نویسی
دانلود رایگان سورس پروژه
سایت برنامه نویسی تک کدر 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
سه شنبه 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.
سه شنبه 21 فروردین 1397 04:06 ق.ظ
Have been taking little over a month.
سه شنبه 21 فروردین 1397 12:20 ق.ظ
Men and women have done the best things for me because of my
obvious (and genuine) stupidity.
شنبه 1 مهر 1396 07:51 ب.ظ
Hey! I know this is kinda off topic nevertheless I'd figured I'd
ask. Would you be interested in exchanging links or maybe
guest authoring a blog article or vice-versa? My site addresses a lot of the same topics
as yours and I believe we could greatly benefit from each
other. If you are interested feel free to send me an email.
I look forward to hearing from you! Wonderful blog by
the way!
یکشنبه 15 مرداد 1396 07:45 ب.ظ
Hi, I desire to subscribe for this website to obtain most
recent updates, so where can i do it please help out.
شنبه 14 مرداد 1396 09:39 ب.ظ
It's a pity you don't have a donate button! I'd definitely donate to this superb blog!

I guess for now i'll settle for bookmarking and adding your RSS feed to my Google
account. I look forward to fresh updates and will talk about this blog with my Facebook
group. Chat soon!
شنبه 14 مرداد 1396 08:35 ب.ظ
Ahaa, its good conversation concerning this article here at this webpage, I have read all that,
so now me also commenting here.
 
لبخندناراحتچشمک
نیشخندبغلسوال
قلبخجالتزبان
ماچتعجبعصبانی
عینکشیطانگریه
خندهقهقههخداحافظ
سبزقهرهورا
دستگلتفکر


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


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