Let us C book Chapter 2 Exercise SOlutions
[A] Point out the errors, if any, in the following C statements: (a) x = ( y + 3 ) ; Proper (b) cir = 2 * 3.141593 * r ; r is undefined char = '3'; WHere is the name dude , no variable name given (d) 4 / 3 * 3.14 * r * r * r = vol_of_sphere ; Right to left associativitiy applies and left side of = should contain only one variable (e) volume = a 3 ; Error no exponentiation form avaiable (f) area = 1 / 2 * base * height ; Correct (g) si = p * r * n / 100 ; perfect (h) area of circle = 3.14 * r * r ; space not allowed in variable name peri_of_tri = a + b + c ; ok slope = ( y2 – y1 ) ÷ ( x2 – x1 ) ; ok (k) 3 = b = 4 = a ; NOt ok - > left side of = cannot have constant count = count + 1 ; perfect (m) char ch = '25 Apr 12' ; not ok only one character allowed in single quote [B] Evaluate the following expressions and show their hierarchy. (a) ans = 5 * b * b * x - 3 * a * y * y - 8 * b * b * x + 10 * a * y ;...