Please explain this output

February 1, 2008 10:13pm CST
main() int A; for(A=-1;A
3 responses
• India
6 Feb 08
when u say '!A' it usually means bitwise operator that is operated....the operation performed her is negating the output ..or otherwise passing valuein A through not gate...so wen u say '!!A' it means NOT(NOT A)...this is nothin but displayin corrosponding positive value !!!! -1 is signed number equilant hexadecimal=-1 in binary=1000001 complementin it we get=0111110 then it is again complemented for positive value ,so we get=0000001 ie 1 then a value increments similarly get 0 and 1!!! Arvind
@pikeshpd (181)
• India
14 Feb 08
Well arvind, I too think this is happening due to bitwise operator.
@abhax123 (1695)
• India
2 Feb 08
dude i think there is an error in this statement printf as we only need A not !!A...
• Australia
2 Feb 08
Its a program written in C++ language, pretty hard to say whats its function but i am sure someone good at C language can help you. Goodluck