string_copy
| string_copy | |
|---|---|
| Turn-in directory | 08_string_copy/ |
| Files to turn in | string_copy.c |
| Allowed external functions | None |
| Type of work | Function |
- Write a program which displays the alphabet based on the starting character in variable
start_char, followed by a newline. Use the following rules: - To help you get started, we will provide some code for you to copy/paste/edit. Make sure you understand every line before you hand it in!
- You need to write a function that takes an array of integers and its length as parameters and returns the average of the integers in the array.
#include <stdio.h> void string_copy(char* destination, const char* source); int main() { const char *hello = "Hello"; char a[10]; string_copy(a, hello); string_print(a); return 0; }
Example output:
$ ./a.out
Hello$