Friday 11 September 2009

Placement questions of C


question of c programming with solution1. Point out error, if any, in the following programmain(){int i=1;switch(i){case 1:printf("\nRadioactivecats have 18 half-lives");break;case 1*2+4:printf("\nBottle forrent -inquire within");break;}}Ans. Noerror. Constant expression like 1*2+4 are acceptablein cases of a switch.2. Point out the error, if any, in the following programmain(){int a=10,b;a>= 5

No comments:

Post a Comment