Sunday, July 12, 2009

In c language can we use an identifier as #define int char?

I don't think you can use reserved words in #define statements. You cannot redefine an in as a char.

In c language can we use an identifier as #define int char?
Sure you can.The preprocessor know nothing about datatypes.Inthat case all ints(4 byte words) will become 1 byte chars.Might cause your program to crash or behave weird though.
Reply:yes you can. the first poster is correct.


No comments:

Post a Comment