string_print

string_print
Turn-in directory06_string_print/
Files to turn instring_print.c
Allowed external functionsputchar
Type of workFunction
  • Write a program which displays the alphabet in alternating lower and uppercase on standard output, starting from the character in variable start_char, followed by a newline.
  • 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 a C string as a parameter and prints it to the standard output.
#include <stdio.h>

void string_print(const char* str);

int main()
{
    const char *hello = "Hello\n";
    string_print(hello);
    return 0;
}

Example output:

$ ./a.out
Hello$