Contact: aviboots(AT)netvision.net.il
39,938 questions
51,875 answers
573 users
#include <stdio.h> #include <string.h> #define SIZE 64 int main(void) { char s[SIZE] = "The code that draw a triangle using simple shaders in OpenGL"; char part[SIZE] = "\0"; strncpy(part, s, 8); puts(part); return 0; } /* run: The code */
#include <stdio.h> #include <string.h> #define SIZE 64 int main(void) { char s[SIZE] = "The code that draw a triangle using simple shaders in OpenGL"; char part[SIZE] = "\0"; strncpy(part, s + 21, 8); puts(part); return 0; } /* run: triangle */