MIPI_AdvancedC_FRTK/Lect2/38.c
2024-11-14 08:45:50 +03:00

23 lines
397 B
C

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(void)
{
int len = strlen("Hello");
char* str1 = malloc(len + 1);
strcpy(str1, "Hello");
char* str2 = malloc(len + 1);
strcpy(str2, "Hello");
if (str1 == str2)
{
printf("Strings are equal\n");
}
else
{
printf("Strings are NOT equal\n");
}
return 0;
}