#include <stdio.h> #include <string.h> int main() { char email[]={"123456@"}; if(strchr(email,'@')==NULL) printf("字符串中无'@'"); else printf("字符串中有'@'"); return 0; }