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

Answers were Sorted based on User's Feedback



what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; ..

Answer / varun

the value of y is not changing so i think y wll reamin 5.

Is This Answer Correct ?    18 Yes 1 No

what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; ..

Answer / prakash

I'm getting "error C2181: illegal else without matching if".
If that is corrected then the output will be y = 5.

Is This Answer Correct ?    5 Yes 0 No

what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; ..

Answer / rahul

8

Is This Answer Correct ?    8 Yes 7 No

what is y value of the code if input x=10 y=5; if (x==10) else if(x==9) elae y=8; ..

Answer / 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

More C Interview Questions

How to explain the final year project as a fresher please answer with sample project

0 Answers  


Explain what does the format %10.2 mean when included in a printf statement?

0 Answers  


who is the founder of c

19 Answers   College School Exams Tests, HP,


How does struct work in c?

0 Answers  


What is LINKED LIST? How can you access the last element in a linked list?

0 Answers   ADP,


what would be the output of the following program? main() { int k = 123; char *ptr; ptr = &k; printf("%d",*ptr); }

4 Answers  


What is information technology.

1 Answers  


Is python a c language?

0 Answers  


void main(int n) { if(n==0) return; main(--n); printf("%d ",n); getch(); } how it work and what will be its output...............it any one know ans plz reply

0 Answers  


What is ponter?

0 Answers   TCS,


Write a program to write a given string in maximum possibilities? i.e str[5]="reddy"; i.e we can write this string in 120 ways for that write a program

3 Answers   Subex,


Which is the best website to learn c programming?

0 Answers  


Categories