So for my program, I have to allow the user to enter a character then ask them how many of that character they want. I'm saving the character and the quantity into two different arrays. I've attached my code but when I go to display the array, it doesn't print the character that I have put in.
#include <stdio.h>
#include <stdlib.h>
#define pause system ("pause")
main(){
char characterOfChoice = '0', charChoice = 'c', charArray[100];
int quantityOfChar = 0, i = 0, intChoice = 0, intArray[100];
printf("Enter a character of your choice ");
scanf("%c", &charArray[charChoice]); //save char to a temp char
printf("Enter a quantity of that character ");
scanf("%d", &intArray[intChoice]); //save int to a temp value
for(i=0; i<100; i++){
charArray[charChoice] = '!';
intArray[i] = 0;
}//End for Loop
for(i=0; i<10; i++){
printf("%c ", charArray[charChoice]);
}
pause;
}//End main