|
, ?4 e6 G8 H4 D. r+ K* Z
#include <stdio.h>3 p, u- P3 x+ h, F' i5 Y- C
#include <string.h>" }! D, i, O9 l% p0 H% ^, D1 e
int main(void) N5 P8 e$ u) c/ t0 P# d
{
4 o, ]3 d9 K) W7 ^3 x char str_1[] = "abc";
, ^& R0 y( P9 I# B; L( _9 [ char str_2[] = "abc";0 s2 ^- P7 G$ o" c5 e [& o* w
char str_3[] = "ABC";+ Z$ e8 O/ w) B
if (strcmp(str_1, str_2) == 0)
, }# ], _, J+ \* w printf("str_1 is equal to str_2. \n");+ ]- H: P+ n: x' X) q
else2 v, N' j4 z( @' C
printf("str_1 is not equal to str_2. \n");2 s& i' c3 S: z1 I
if (strcmp(str_1, str_3) == 0)
; E+ @2 A2 P# X! i7 i- x- P6 @) P printf("str_1 is equal to str_3.\n");
8 Y% E0 ?8 ?7 S else- w! U6 \, k% f# y# D0 _
printf("str_1 is not equal to str_3.\n");) ^1 y1 @3 f6 ?- m9 y; i9 G
|
|