|
CS256 - Fundamentals of Structured Programming
| Displaying exercises/e7/files/p4.c
#include <stdio.h>
#define K 1024
/**
* Copy the string in src to dst. Only copy as many characters (including the
* null character) that are in src to dst. Points will be deducted for copying
* too many or too few characters.
*/
void my_strcpy(char dst[], char src[])
{
}
int main(void)
{
char input[K+1], copy[K+1];
// Get a line of input (up to K number of bytes) into the 'input' string:
// Do not modify any of the following:
my_strcpy(copy, input);
printf("%s", copy);
return 0;
}
|