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 |
Which header file should you include if you are to develop a function which can accept variable number of arguments?
what is software?
What is time complexity c?
Find Error if any in below code, Justify ur answer: struct xx { int a; struct yy { char c; struct xx* p; } struct yy* q; }
Explain how do you determine the length of a string value that was stored in a variable?
how should functions be apportioned among source files?
main() { int i=0; while(+(+i--)!=0) i-=i++; printf("%d",i); }
Write the Program to reverse a string using pointers.
What is break statement?
what is Array?
enum DAY { sunday, monday, tuesday }; enum EDAYS { friday, saturday, sunday }; void main() { int i =0; if( i == sunday) { printf("%d",i); } } what would be the output?
Does sprintf put null character?