Contact: aviboots(AT)netvision.net.il
40,891 questions
53,304 answers
573 users
#include <stdio.h> #include <string.h> int main(void) { char s[] = "java c c++ c# php python"; char first_10_chars[11] = ""; strncpy(first_10_chars, s, 10); first_10_chars[10] = '\0'; printf("%s", first_10_chars); } /* run: java c c++ */