Posted inPlacement Papers

Sonata Software Ltd Placement Paper

Company: Sonata Software Ltd 1.Point out error, if any, in the following programmain(){int i=1;switch(i){case 1:printf(“nRadioactive cats have 18 half-lives”);break;case 1*2+4:printf(“nBottle for rent -inquire within”);break;}}Ans. No error. Constant expression like 1*2+4 are acceptable in cases of a switch. 2.Point out the error, if any, in the following programmain(){int a=10,b;a>= 5 ? b=100 : b=200;printf(“n%d”,b);}Ans. lvalue required […]