I'm writing a program to display names and the number of apartments however, my array storing the names is unable to display the names saying that they're unidentified. Is there anyway to have the string contained in the array to display? Also, I seem to get the value of n displaying beneath the number of apartments in the display, is there anyway to get rid of this? Here's my code:
#include <stdio.h>
int main(void)
{
int i;
char name[] = {North, West, South, East};
int apt[] = {24, 30, 14, 18};
const int n = 5;
printf("Name No. of Apartments\n");
for (i = 0; i < n; i++)
printf("%c %d\n", name[i], apt[i]);
return 0;
}