-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path19-A-3.c
52 lines (28 loc) · 1.11 KB
/
19-A-3.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
#include<stdio.h>
#include<string.h>
void main(){
char s1[1000],s2[1000];
printf("Enter the first string :");
gets(s1);
printf("Enter the second string :");
gets(s2);
char s3[1000]=s1[1000],s3[1000]=s2[1000];
printf("length of string 1 is : %d\n",strlen(s1));
printf("length of string 2 is : %d\n",strlen(s2));
if(strcmp(s1,s2)==0){
printf("Both strings are same.");
}
else
{
printf("The both strings are not same");
}
printf("\n");
printf("The reverse string 1 is :%S\n",strrev(s1));
printf("The reverse string 2 is :%S\n",strrev(s2));
printf("%s\n", strcat(s1,s2));
printf("%s\n",strlwr(s1));
printf("%s\n",strlwr(s2));
printf("%s\n",strupr(s1));
printf("%s\n",strupr(s2));
printf("%s\n", strcpy(s1,s2));
}