#include <stdio.h>
/* Swap location of array with char specified, than print out array. */
main()
{
/* Initialize variables */
char letters[5]={'a','b','c','d','e'};
char loc, let, temp;
/* Get location and letter */
printf("Enter the location in the array you want to swap: ");
scanf("%c", &loc);
printf("Enter letter you want to swap with specified location: ")
scanf"%c", &let);
/* Swap speified location and letter into array */
That is all I have so far, I can't think of how you would do it. Any help with this?


Sign In
Create Account


Back to top









