a=5
a=a++/++a
Answers were Sorted based on User's Feedback
Answer / prasannanjaneyulu.kandimalla
a=5;
a=a++/++a;
in that numerator is 5 and denominator is 6(finally a value
is:6)
so a=6/6=1
finally a is postincremented so it is2(1+1)
| Is This Answer Correct ? | 17 Yes | 4 No |
Answer / harinath
as the above person said the answer is right but
at first the evaluation starts from denominator, according
to operator precedence pre-increment has more value than
other two(/ and post-increment)
so at first ++a=6 is assigned to a
now the value in a is 6 .so 6/6 gives the value 1.
then post-increment occurs to the value in a(ie.,1).
so the value of a is finally 2(1+1).
| Is This Answer Correct ? | 6 Yes | 2 No |
Answer / svs
2
5=5++/++5
6=6++/6
6=6/6
6=1+increments one
answer is two
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / ajeet kumar
Ans a=2.
here a=a++/++a; //initial value of a=5.
1)firstly a=a++/++a <---it is pre-increment so firstly this
value will update.i.e a will be 6.
a=a++/6; //a=6
a=6/6; a=1;//after this line executions one increment will left of variable a.
| Is This Answer Correct ? | 0 Yes | 1 No |
Answer / ss
answer can be 2 and 1 as well
actually it is compiler dependent
| Is This Answer Correct ? | 0 Yes | 4 No |
What is the scope of static variables?
How can I find the day of the week given the date?
Can static variables be declared in a header file?
create an SINGLE LINKED LISTS and reverse the data in the lists completely
What is static function in c?
main() { unsigned int k = 987 , i = 0; char trans[10]; do { trans[i++] =(char) (k%16 > 9 ? k%16 - 10 + 'a' : '\0' ); } while(k /= 16); printf("%s\n", trans); }
How can I check whether a file exists? I want to warn the user if a requested input file is missing.
How can I open a file so that other programs can update it at the same time?
Is the exit() function same as the return statement? Explain.
0 Answers Agilent, ZS Associates,
1.)how to find d most repeated word in a string? string ="how do you do"?? output should be do
1 Answers AAS, Nagarro, Vuram,
Do you know what are the properties of union in c?
Write a program to print ASCII code for a given digit.