use the name of the array:
Code:
/*Just a tutorial for a Cboard poster right now.
status: na
*/
#include <stdio.h>
#define SIZEofArray 12
void myFunction(char array[], int);
int main(void) {
int i, shift;
char array[12] = { "Is this OK?" };
putchar('\n');
for(i = 0; i < SIZEofArray; i++)
printf("%c", array[i]);
printf("\n\n How many letters should I shift upward? [0-26]: ");
scanf("%d", &shift);
myFunction(array, shift);
putchar('\n');
for(i = 0; i < SIZEofArray; i++)
printf("%c", array[i]);
printf("\n\n\t\t\t press enter when ready");
while((i = getchar()) != '\n');
i = getchar();
return 0;
}
void myFunction(char array[], int myShift) {
int i;
for(i = 0; i < SIZEofArray; i++)
if(array[i] >= 'A')
array[i] += myShift;
}