Google

Friday, January 22, 2010

CSC202 & ENG4033M : Comparing Strings

//Comparing Strings
#include "stdio.h"
#include "string.h"
void main()
{
char name[32];
scanf("%s",name);

if(strcmp(name,"bill")==0){
printf("Hello Bill Gates\n");
}else{
printf("Hello %s\n",name);
}
}