#include<stdio.h>
#include<ctype.h>
#define size 100
int main()
{
char s[size] = "Applea";
char c = "";
c = getchar();
int i, j;
int n = 100;
for (i = 0; i < n; i++)
{
if (s[i] == (char)c)
{
for (j = i; j < n; j++)
{
s[j] = s[j + 1];
}
n--;
j--;
}
printf("%c", s[i]);
}
return 0;
}
It's a function to remove certain characters from a string, but I heard it's case-sensitive due to the characteristics of the string
Currently, if you enter a, only a is erased, and A is not erased, but you do not use the string processing function.
Is there a way to remove both A and A when entering a?
string c function
#include <stdio.h>
int main()
{
char s;
s = 'Q';
if (s > 70 && s < 90) {
s = s + 32;
printf("%c", s); // "q"
}
return 0;
}
https://goodgid.github.io/ASCII-Code/
620 Uncaught (inpromise) Error on Electron: An object could not be cloned
573 rails db:create error: Could not find mysql2-0.5.4 in any of the sources
582 PHP ssh2_scp_send fails to send files as intended
916 When building Fast API+Uvicorn environment with PyInstaller, console=False results in an error
© 2024 OneMinuteCode. All rights reserved.