I wrote the absolute function using ternary operator as follows
int abs(int a) { a >=0 ? return a : return -a; }
I get the following er
The second and third arguments to the ternary operator are expressions, not statements.
return a
is a statement