its because it is integer pointer subtraction, So  subtraction  result will
be divided by integer size.

so 30/4 = 7.

2012/11/6 rajesh pandey <[email protected]>

> *int *x ,int *y;
> x=(int *) 50;
> y=(int *)20;
> cout<<x-y<<endl;
>
> why the output is 7.*
>
> --
> You received this message because you are subscribed to the Google Groups
> "Algorithm Geeks" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/algogeeks/-/wgVXAzGRgU4J.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/algogeeks?hl=en.
>



-- 
Regards,
Rahul Patil

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to