I have a more complicated program I'm wishing to have display the output, however, to save some time I'm using an example of a shorter version. Please help count the lines in input and display the output in terminal when ./program is executed after compilation.Code:
int c, n1;
n1 = 0;
while ((c = getchar()) != EOF)
if (c == '\n')
To help count and compute lines, words and within arrays.