sqr(3+1) is calculated as 3+1*3+1
In c, first preference is given to multiplication(*) and then comes addition(+) hence in 3+1*3+1 , 1*3 is first calculated and then all the three numbers are added.
If you are expecting the result as 16, try
the above code is considered as (3+1)*(3+1)
here, first the operations inside the brackets are performed followed by the multiplication.