What is the difference between #define n 10 and const int n=10
theausum
8
Junior Poster in Training
Recommended Answers
Jump to Postdifference b/w const and #define (macro).
1. Type Checking:- macros are not type safe where as const are type safe. since the macros are replaced by definition at the time of preprocessing (which is done before compilation). the storage area of macros is not defined where as const has …
All 2 Replies
Reply to this topic
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.