Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C (http://www.go4expert.com/forums/c/)
-   -   Someone please tell me why the use of ^ sign is not allowed in c????????? (http://www.go4expert.com/forums/tell-sign-allowed-c-t2753/)

ramgates 29Jan2007 17:17

Someone please tell me why the use of ^ sign is not allowed in c?????????
 
Hai guys I dont know why the use of ^ sign (that is to denote 2*2*2 as 2^3) is not allowed in c, eventough we say c language as a powerfull language?????????????????????????? :confused: :confused:
Please tell me the reason!!!!!!!!!!!!!!!!!! :eek: :eek:

friendsforniraj 29Jan2007 18:10

Re: Someone please tell me why the use of ^ sign is not allowed in c?????????
 
hello
c do allows use of ^ but not for power function
but this is an operator in c used for xor operations
you will learn dat in bitwise operations
and if you want to do the power of a no
then c has a predefined function in math.h
named pow(no,power);
means if u want to do 2*2*2;
jus do pow(2,3)


All times are GMT +5.5. The time now is 11:22.