Extracting the longest line from standard input
I see some things that may help you improve your code.

Eliminate unused variables

Unused variables are a sign of poor quality code, and you don't want to write poor quality code. In this code, line and longest are unused -- their values are set but then never referenced again.  Your compiler is smart enough to tell you about this if you ask it nicely.

Think carefully about variable use

After the first line is read, the variable i isn't really needed.  The way it is now, it could instead simply increment max directly.

Think carefully about the task

If you need to save the longest line, you can't overwrite it every time.  The difference between yours and the K&amp;R version is that yours prints multiple times and only the last time it prints is actually the longest line.

Check for unusual inputs

What happens if the file consists of a single long line?   The existing code will fail because the code that reads the first line fails to stop at the end of the file.  Also none of the code checks for lines that are too long.

Break up the code into smaller functions

The main() function does a series of identifiable steps.  Rather than having everything in one long function, it would be easier to read and maintain if each discrete step were its own function.

Don't repeat yourself

There's really no need to handle the first line any differently than any other line.  Instead, you could simply run the main loop.

Minimize work

There's no reason to clear the entire line array.  Instead of the memset, your code could simply do this:

help[0] = '\0';


Choose better variable names

The name help is not at all appropriate to its actual function.  I'd recommend using line for everywhere that help is currently used.

Use modern syntax

The old K&amp;R style was to declare all variables at the top of the function, but that's not any longer either required or desired.  Instead, current practice is to declare variables near their first use and to keep their scope small.

Use modern C idioms

Right now the code contains these lines:

help[j]=ch;
++j;


However, that's more idiomatically written like this:

help[j++] = ch;


Fix your formatting

There are inconsistent spaces in variable declarations, and inconsistent indentation. Being consistent helps others read and understand your code.

Use more whitespace

Instead of writing a line like this:

while ((ch=getchar())!=EOF){


use a bit more whitespace and write it like this:

while ((ch = getchar()) != EOF) {


Doing so will make it easier to read and understand your program.

Eliminate return 0 at the end of main

Since C99, the compiler automatically generates the code corresponding to return 0 at the end of main so there is no need to explicitly write it.