Contact: aviboots(AT)netvision.net.il
39,885 questions
51,811 answers
573 users
#include <stdio.h> #include <string.h> #define N 3 int main(int argc, char **argv) { char s[16] = "index.php"; if (strncmp(s, "ind", N) == 0) { printf("ind\n"); } else { printf("else\n"); } return 0; } /* run: ind */