#include <stdio.h> #include <string.h> int main(int argc, const char *argv[]) { char *other; int len = 100; char username[len]; strncpy(username, "Admin", len); strncpy(other, username, len-1); other[len-1] = '\0'; printf("%s", username); printf("%s", other); return 0; }
# | Change | User | Description | Committed | |
---|---|---|---|---|---|
#1 | 15129 | zachwhaley | Add practice directory |