Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


Closed Thread
  Search this Thread
Old 06-04-2011, 09:27 AM   #1
LQ Newbie
Registered: Jun 2011
Posts: 4

Rep: Reputation: Disabled
i tried using this code for deleting a user given character from a user given string



char* reverse (char*,char);

int main()


char *name;

char *ch=name;

char c;

printf("\nEnter the string to be reversed and the character to be deleted");


char* ret=reverse(ch,c);

printf("\nthe modified string is %s",ret);



char* reverse (char* p,char t)

{ int l,i;







{ *p=*(++p);







but it showed segmentation error..please help
Old 06-04-2011, 09:43 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

Please don't double/cross post your question in more than one forum. That will only confuse you and us on where the conversation is taking place. Stick to your thread in the Programming forum. Reported as duplicate of this one.

Kind regards,

Old 06-04-2011, 05:59 PM   #3
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,067
Blog Entries: 11

Rep: Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911Reputation: 911
Please post your thread in only one forum. Posting a single thread in the most relevant forum will make it easier for members to help you and will keep the discussion in one place. This thread is being closed because it is a duplicate.

Closed the original in favour of the more sensibly formatted & placed dupe:

Closed Thread


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to change String using sed with a string \/home\/user\/Desktop icecoolcorey Programming 10 06-13-2008 12:32 AM
User Preferences: Use HTML code instead of vB code? (vB code is overrated) stefanlasiewski LQ Suggestions & Feedback 5 07-26-2005 02:37 AM
deleting a user joe k Linux - General 3 12-08-2004 07:31 AM
Deleting a user leecming Linux - Newbie 8 06-12-2004 03:17 PM
Deleting a user? WorldBuilder Linux - Software 1 03-28-2003 12:58 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:50 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration