#include <stdio.h>
// If you are familiar with arrays and strings, feel free to skip to STEP 3. 

// STEP 1: Read the following function to understand the basics of arrays

int sum_of_array() {
  int array[10]; //This is how you declare an int array
  //Initialize the array as 0,...,9
  for(int i = 0; i < 10;i++){
    array[i] = i; 
  }
  int sum = 0;
  for(int i = 0; i < 10;i++){
    sum += array[i]; //same as sum = sum + array[i]
  }
  return sum;
}

// STEP 2: Read the following function to understand how a string is 
// implemented using array of char

void my_first_string() {
  char my_string[15]; // Declare an array of char
  my_string[0] = 'I'; // Use single quotes to denote a char
  my_string[1] = ' '; // This is a space
  my_string[2] = 'a';
  my_string[3] = 'm';
  my_string[4] = ' ';
  my_string[5] = 'a';
  my_string[6] = ' ';
  my_string[7] = 's';
  my_string[8] = 't';
  my_string[9] = 'r';
  my_string[10] = 'i';
  my_string[11] = 'n';
  my_string[12] = 'g';
  my_string[13] = '\n'; //This is a new line symbol;
  my_string[14] = '\0'; // THIS IS VERY VERY VERY IMPORTANT. 
  // In C, we have to put a backslash zero to indicate the end of a string.

  printf("%s", my_string);
}

// STEP 3: Complete the following function to create a string which prints 
// all 26 letters in upper case and lower case alternatively. 
// The desired output should be (pointer to string) "AaBbCcDdEeFfGg....Zz"
// Hint: Do it in a loop. 
void alphabet_string() {
  // TODO: write code here!
  
}


int main() {
  printf("Sum of array: %d\n", sum_of_array());
  my_first_string();
  alphabet_string();
}