adspace
What is the value of y in the following code?
x=7;y=0;
if(x=6)
y=7;
else
y=1;
Answer Posted / balaji jayakumar
y=7 because if condition doesnt fail... so the immediate
statement after if will be executed and 7 gets printed. It
is quite certain only if "if" fails else will be be opted
for. so y=7... no error statements will occur.. i have tried
it in c.
| Is This Answer Correct ? | 3 Yes | 0 No |
Post New Answer View All Answers
swap 2 numbers without using third variable?
what is ur strangth & weekness
write a c program to find the sum of five entered numbers using an array named number
Do you know the difference between malloc() and calloc() function?
hi send me sample aptitude papers of cts?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
write a progrmm in c language take user interface generate table using for loop?
what is associativity explain what is the precidence for * and & , * and ++ how the folloing declaration work 1) *&p; 2) *p++;
How do you determine the length of a string value that was stored in a variable?
hi folks i m approching for h1 b interview on monday 8th of august at montreal and i m having little problem in my approval notice abt my bithdate my employer has made a mistake while applying it is 12th january and istead of that he had done 18 the of january do any body have any solution for that if yes how can i prove my visa officer abt my real birthdate it urgent please let me know guys thaks dipesh patel
Explain the difference between null pointer and void pointer.
The % symbol has a special use in a printf statement. How would you place this character as part of the output on the screen?
`write a program to display the recomended action depends on a color of trafic light using nested if statments
What is variable initialization and why is it important?
What are compound statements?