0

C statements

Please point out errors(with logic),if any,in the following c statements: (a) x=(y+3); (b) cir = 2*3.141593*r; (c) char ='3'; (d) 4/3*3.14*r*r*r=vol_of_sphere; (e) volume =a (f)area=1/2*base*height; (g)si=p*r*n/100; (h)area of circle = 3.14*r*r; (i)peri_of_tri=a+b+c; (j)slope=(y2-y1)Ă·(x2-x1); (k)3=b=4=a; (l)count=count+1; (m)char ch='23 Aug 18';

21st Nov 2018, 3:06 AM
kp kalia
kp kalia - avatar
2 Answers
+ 4
With a little effort, you can identify many of the obvious issues. To be certain, you could test each line out to validate what you think is wrong or not wrong, for that matter.
21st Nov 2018, 5:51 AM
David Carroll
David Carroll - avatar
+ 2
This looks like homework. Please go through the tutorial and try to do it yourself.
21st Nov 2018, 4:55 AM
Kishalaya Saha
Kishalaya Saha - avatar