C Programming/String Manipulation
Equality Check
//main.c
#include <stdio.h>
#include <conio.h>
#include <string.h>
#include <stdlib.h>
int main(void)
{
char name[60];
char halt[60] = "exit";
for(int i=0;i<10;i++){
printf("Enter your name: ");
scanf("%s", name);
if(strcmp(name, halt) == 0){
return 0;
}
printf("Hello %s!\n", name);
}
return 0;
}