Skip to content

Commit a90e82a

Browse files
authored
Add files via upload
1 parent 6507d5d commit a90e82a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

84 files changed

+763
-0
lines changed

Module 10/A_Create_A_New_String.bin

40.4 KB
Binary file not shown.

Module 10/A_Create_A_New_String.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#include<stdio.h>
2+
#include<string.h>
3+
int main()
4+
{
5+
char s[1001],t[1001];
6+
scanf ("%s %s",s,t);
7+
int lenS=strlen(s);
8+
int lenT=strlen(t);
9+
printf("%d %d\n",lenS,lenT);
10+
printf("%s %s\n",s,t);
11+
return 0;
12+
}

Module 10/A_Create_A_New_String.exe

40.4 KB
Binary file not shown.

Module 10/B_Let_s_use_Getline.bin

40.4 KB
Binary file not shown.

Module 10/B_Let_s_use_Getline.c

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#include<stdio.h>
2+
#include<string.h>
3+
int main()
4+
{
5+
char a[1000001];
6+
fgets(a,1000001,stdin);
7+
int i=0;
8+
while(a[i]!='\\')
9+
{
10+
printf("%c",a[i]);
11+
i++;
12+
}
13+
return 0;
14+
}

Module 10/B_Let_s_use_Getline.exe

40.4 KB
Binary file not shown.

Module 10/D_Strings.bin

41.1 KB
Binary file not shown.

Module 10/D_Strings.c

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#include <stdio.h>
2+
#include <string.h>
3+
int main()
4+
{
5+
char a[11], b[11];
6+
scanf("%s\n%s", a, b);
7+
int lenA = strlen(a);
8+
int lenB = strlen(b);
9+
printf("%d %d\n", lenA, lenB);
10+
strcat(a, b);
11+
printf("%s\n", a);
12+
int temp = a[0];
13+
a[0] = b[0];
14+
b[0] = temp;
15+
for (int i = 0; i < lenA; i++)
16+
{
17+
printf("%c", a[i]);
18+
a[0] = b[0];
19+
}
20+
printf(" ");
21+
for (int i = 0; i < lenB; i++)
22+
{
23+
printf("%c", b[i]);
24+
b[0] = temp;
25+
}
26+
return 0;
27+
}

Module 10/D_Strings.exe

40.5 KB
Binary file not shown.

Module 10/E_Count.bin

40.4 KB
Binary file not shown.

0 commit comments

Comments
 (0)