single line if c++

C++
a = (x > y) ? z : y;

/* Same as */

if (x > y)
{
    a = z;
}
else
{
    a = y;
}
Source

Also in C++: