Banned functions in CS3214§
The following C functions are banned in all assignments and exams in CS3214:
strcpy
strcat
strncpy
strncat
sprintf
vsprintf
fscanf("%s", ...)
,scanf("%s", ...)
, orsscanf
with the"%s"
modifier.
Reimplementations of banned functions§
Reimplementations of banned functions are also not permitted,
as is the use of memcpy
in attempts to reimplement them.
For example, code such as this:
char* final = calloc(500, sizeof(char));
int index = 0;
final[index++] = '@';
memcpy(final + index, host, strlen(host));
index += strlen(host);
final[index++] = ' ';
final[index++] = 'i';
final[index++] = 'n';
final[index++] = ' ';
memcpy(final + index, lastpwd, strlen(lastpwd));
index += strlen(lastpwd);
final[index++] = ']';
final[index++] = ' ';
falls under this category.