I'm a beginner in C and try to use memcpy to send byte in order to transfer data to server. It seems like no matter what I choose for 3rd argument. It's always the same.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main() {
char myChar[100] = "Hello world! ABC is an online sandbox that makes it easy to try out";
char myChar2[100];
memcpy(myChar2, myChar, 3);
printf("%s", myChar);
return 0;
}
This is the result.
Hello world! ABC is an online sandbox that makes it easy to try out