Though the pre processor assigns i = 3.14159265. When i compile it, gives an error saying expected an expression before \'=\' token what and why is that ?
#incl
#define PI = 3.14159265
defines PI to be = 3.14159265
literally including the equals sign. Thus i = PI;
is the same as:
i = = 3.14159265;
which clearly won't compile. To fix it, remove the =
from your definition of PI:
#define PI 3.14159265
You don't need the '=' when you use the define keyword. Including it will include the '=' in the definition.
#define PI 3.14159265