This is what I've done so far:
#include <stdio.h>
/*
1) Enter in a string
2)String should be checked for repeating characters (call a function)
3)The repeating characters hould be deleted (within the function)
4)New modified string should be displayed (returned from the function to be printed in the main method)
*/
//check whether repeating strings are present
char no_repetitions(char str[]);
char no_repetitions(char str[])
{
}
//main method
main()
{
static char string[] = "this is";
printf ("Enter in a string : ");
scanf ("%s", string);
printf ("The entered words in : %s", string);
}
example of expected output
Quote
Enter a string : This string contains repeated characters
The string without repetition is : This trngcoaepd
The string without repetition is : This trngcoaepd
I know it's not much at all but I really am a newbie and want to know could this be done? are regular expressions involved? is there a way to do this with out using reg expressions?
This post has been edited by rustix: 28 November 2007 - 11:31 AM

New Topic/Question
Reply




MultiQuote





|