Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
#include <stdlib.h>
#include <string.h>
void moveElements(char *str, char let)
{
int i, k;
for (k = 0; k < 50; k++){
if((str)[k] == let){
for (i = k; i < 50; i++)
{
(str) = (str) ;
}
}
}
}
int main()
{
char letra;
char str = (char)malloc(50 * sizeof(char));
scanf("%s", str);
scanf(" %c", &letra);
printf("Before: %s\n", str);
moveElements(&str, letra);
printf("After: %s\n", str);
free(str);
return 0;
}