What is a "Line of code"

Particularly when counting lines of code…

// ex 1
if(a != 0){
  b = 1/a;
  }
else{
  b = -1;
  }

// ex 2
b = (a != 0 ? 1/a : -1);

Ex 1 looks like 6 lines (if you’re counting line breaks). Which could have been written in a single line as an if(...) expr1; else expr2;
Or the equivalent as shown in Ex 2.

P.S. - yes, I know my bracketing style is uncommon.

Turns out Wikipedia has a page on this…

Basically, it’s a poor metric for comparisons.