Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

what is y value of the code if input x=10
y=5;
if (x==10)
else if(x==9)
elae y=8;
a.9
b.8
c.6
d.7

Answer Posted / vint

int main()
{
int x = 10, y = 5;
if(x==10)
else if(x==9)
else y=8;
printf("%d",y);
return 0;
}
error: expected expression before 'else'

------------
int main()
{
int x = 10, y = 5;
if(x==10) {}
else if(x==9) {}
else {y=8;}
printf("%d",y);
return 0;
}

OP: 5

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is structure and union in c?

1154


a c variable cannot start with a) an alphabet b) a number c) a special symbol d) both b and c above

1233


What is void main ()?

1077


What is the difference between procedural and declarative language?

1147


What is getche() function?

1050


Why is not a pointer null after calling free?

1027


What is malloc return c?

1032


How do I read the arrow keys? What about function keys?

1088


What is the difference between procedural and functional programming?

1082


How can I direct output to the printer?

1324


Synonymous with pointer array a) character array b) ragged array c) multiple array d) none

1074


Why is structure padding done in c?

1134


How can I get back to the interactive keyboard if stdin is redirected?

1192


What are 3 types of structures?

1072


What is the difference between c &c++?

1158