Dear all,
I recently saw a program on the following lines
#include<stdio.h>
#include<stdlib.h>
int main(void)
{
int i,j=0;
for(i=3;i>>j++;--i)
{
printf("%d\t",'-'<< j);
printf("%d\t",'-'-'/'<< j);
printf("%d\t",'-'-'-'/'/'<< j);
printf("%d\t",'-'-'-'-'/'/'/'<< j);
puts("");
}
printf("\n %d",'-');
printf("\n %d",'-'-'/');
printf("\n%d",'-'-'-'/'/');
puts("");
return(EXIT_SUCCESS);
}
when i ran the program(using gcc compiler) i got the o/p as
o/p as:-
90 -4 90 -2
180 -8 180 -4
45
-2
45
-1
now my question is how the following values are
evaluated ?
'-'-'/';
'-'-'-'/'/';
'-'-'-'-'/'/'/';
is it implementation dependent?
does it depend on endianess nature of machine?