char s1[] = "Semester 1."; char s2[] = "Semester 2."; if (strncmp(s1, s2, 10) == 0) printf("Equal "); else printf("Not equal "); }