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 |
write a C code To reverse a linked list
how to make program without <> in library.
How can I insert or delete a line (or record) in the middle of a file?
x=2,y=6,z=6 x=y==z; printf(%d",x)
13 Answers Bharat, Cisco, HCL, TCS,
Is it better to use a pointer to navigate an array of values, or is it better to use a subscripted array name?
without using arithmatic operator solve which number is greater??????????
What is the difference between text and binary i/o?
#include<stdio.h> main() { int a[3]; int *I; a[0]=100;a[1]=200;a[2]=300; I=a; Printf(“%d\n”, ++*I); Printf(“%d\n”, *++I); Printf(“%d\n”, (*I)--); Printf(“%d\n”, *I); } what is the o/p a. 101,200,200,199 b. 200,201,201,100 c. 101,200,199,199 d. 200,300
Can you think of a way when a program crashed before reaching main? If yes how?
List some of the dynamic data structures in C?
What does extern mean in a function declaration?
What is the difference between scanf and fscanf?