Can anyone give a simple code to explain the statement"a funtion ca have multiple declaration but only one definition"?
saurabh.mehta.33234 13 Junior Poster in Training
Recommended Answers
Jump to Postvoid foo(void); // Declaration void foo(void); // Declaration (redundant but legal) void foo(void) {} // Definition void foo(void) {} // Definition (redundant and illegal)
A function definition is where you give the function a body. A declaration has no body and only lists the function signature …
All 2 Replies
deceptikon 1,790 Code Sniper Team Colleague Featured Poster
saurabh.mehta.33234 commented: thankyou for your simple explanation +0
marc.punzirudu 0 Newbie 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.