Shell/commands/scripting/c questions

  1. Can anyone explain me what the line
    x=signal(SIGINT,nh);
    does?

  2. How do I write a command to print the longest line in a file?

  3. How do I write a command to print the last word of every line of a file using sed?

  4. What exactly does this line do?
    :%s/^\([0-9]\)\([0-9]\)/\2\1/g^M
    Assuming it is run from vi.

Thank you all for your time.

Forgot about the rules already?

(6) Do not post classroom or homework problems

So from now on every question is assumed to be homework problem?

Blantant violations from repeat offenders such as yourself are not going to be tolerated on this site.