ISRO 2015 compilation error in c

  Q. Which of the following has the compilation error in c?

 Option 

 A- int n=17;

B- char c=99;

c- float f=(float)99.32;

d-#include<stdio.h>

11Comments
shivanisrivarshini shivanisrivarshini 26 May 2016 11:28 am

I think None of options have compilation error

Hradesh hradeshpatel 26 May 2016 11:30 am

exactly......but isro give Ans option 4..............but i am not know why

shivanisrivarshini shivanisrivarshini 26 May 2016 11:59 am

yes their may be chance to have compilation error could not open file stdio

http://www.infolet.org/2013/08/solving-unable-to-open-include-file-stdio...

Vivek Vikram Singh vivek14 26 May 2016 02:06 pm

Another bad question from ISRO. None of it should result in Error. Also, poor title of question. Please update title.

Ramesh rameshthodengal 20 Apr 2018 12:08 am
D is the answer. As every line in C should end with a semicolon, but it's missing in option D
Atanu Ghosh [email protected] 28 May 2016 03:07 pm

All are correct ans....

Lovely cse23 14 Jun 2016 03:51 pm

char c = 99 is not having single quote i think it should be'99'..plz explain

Hradesh hradeshpatel 14 Jun 2016 10:29 pm

according to me it's '99' ............but in question is not uses ' '..

Vivek Vikram Singh vivek14 14 Jun 2016 11:32 pm

char c= 99 is correct. No compilation error. c can take values from -127 to +127. c=99, if you print with %d in printf, you will see output 99. If you print c using %c in printf, you will see output as c, 99 is ASCII for c.

Hradesh hradeshpatel 15 Jun 2016 12:33 am

thks..

Ramesh rameshthodengal 20 Apr 2018 12:08 am
D is the answer. As every line in C should end with a semicolon, but it's missing in option D