I am new in C programming. While I was trying to code, I came across this problem. Sorry, if the solution is obvious and I posted it here.

```
#include <stdio.h>
int main(){
int T = 2;
    while(T--){

        c = getc(stdin);
        while( (c != '\n') && (c != EOF)){
           // do some work
        c = getc(stdin);    
       }
    }
return 0;
}

```

what I want is like if I have multiple string inputs in multiple lines, e.g.,

> 
> Hithere
> 
> 
> howareyou
> 
> 
> Iamgood
> 
> 
> 

And then, if after reading characters "**hith**", the while loop is broken then the next character to be read by **fgetc(stdin)** should be from the second line(**howareyou**) NOT the characters from "**Hithere**".

> 
> Actually, I will be given 3 input strings in 3 different lines. And I
>  have to check the strings individually for some special character. And
>  if the character is found then I will print that it is found and
>  immediately stop checking any further characters in that string.
>  Similarly, check for the next string, then next string and so on.
> 
> 
> 

Many many thanks in advance. Please help me.