printf("Welcome to the registration procedure. \n");
printf("Password requirements: One uppercase,\n one digit,\n one special character,\n up to 30 characters\n");
scanf(" %s", pass);
printf(" %s", pass);
I've gone reasonably far into the C tutorial and am trying to do the first challenge. I've decided to try and also limit the user's size of password because that's what websites often do.
However, here comes my first issue. Despite the array's size being 6 bits long, it still accepts all lengths of string i feed into it and does not trim them.
Question is then asked: why preassign a size to an array if C takes more space when it feels like doing so?