hi guys we say that c language is a powerfull language but the use of '^' to represent 2*2*2 as 2^3 is restricted in c language where as the use of '^' is allowed in other simple languages.
ramgates 0 Newbie Poster
Recommended Answers
Jump to Post^ isn't restricted, it just means something other than what you're trying to do. ^ is the bitwise exclusive OR operator, not an exponentiation operator. What you want is the pow function:
#include <math.h> pow ( 2, 3.0 );
Jump to Post>C is not a simple language.
C is a very simple language. It's just really hard to use. ;)
All 7 Replies
Narue 5,707 Bad Cop Team Colleague
manutd 2 Junior Poster
Narue 5,707 Bad Cop Team Colleague
manutd 2 Junior Poster
ramgates 0 Newbie Poster
ramgates 0 Newbie Poster
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.