I' working on an array where the user inputs characters(up to 80). I then need to output the characters, one per line, until the string is null. My problem is in the while loop i think, im just not sure what to do from here. Any ideas?
#include <stdio.h>
void main()
{
char chararray[80];
int n = 0;
printf("Insert a string no greater than 80 characters. Press enter to end string.\n");
gets(chararray);
while (chararray[n] != NULL, chararray[n++]);
{
printf("%c", chararray[80]);
}
printf("Thank you for using this program\n");
return;
}