Mega Code Archive
Categories
/
C
/
Code Snippets
String copy assign the pointer value
#include
#include
int main(void) { char *p = "stop"; char str[100]; do { printf("Enter a string: "); gets(str); } while(strcmp(p, str)); return 0; }