plz give me code for this problem:

i am to enter a main string(e.g elephant) and a sub string (e.g ant).i have to find whether the main string contains the substring or not.if it does , i have to return the location of substring & replace it with a new string.i have done it using pointers but i want it without using pointers.
i only have to use arrays.

I don't want to be rude but...

  • This thread is in the totally the wrong forum
  • Since it's in the wrong forum, we have no idea what language you're trying to write in
  • You haven't shown any effort

In other words, post your latest attempt at coding this, and be sure to use code tags. Please specify which language you're trying to write this for, so that the moderators can move this to the correct forum. Thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.