0% found this document useful (0 votes)
26 views1 page

Notes

The document outlines key programming concepts such as the difference between declaration, definition, and implementation of functions, as well as the rules for function overloading and error types. It emphasizes the importance of function declaration order, pointer behavior, and the limitations of const objects in calling non-const functions. Additionally, it clarifies that uninitialized variable usage leads to runtime errors while undeclared variables cause syntax errors.

Uploaded by

ebram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views1 page

Notes

The document outlines key programming concepts such as the difference between declaration, definition, and implementation of functions, as well as the rules for function overloading and error types. It emphasizes the importance of function declaration order, pointer behavior, and the limitations of const objects in calling non-const functions. Additionally, it clarifies that uninitialized variable usage leads to runtime errors while undeclared variables cause syntax errors.

Uploaded by

ebram
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Notes

[Link] difference between declaration , definition , implementation?


->declaration : is the prototype of the function , allocating the memory for a
variable
->definition = implementation : the body of the function

2. overloading : can’t be executed by changing the return type only but


executed by changing the number of arguments or types of them

3. using variable without initializing is Run time error not syntax error
But using it without declaration is syntax error

[Link] call function in another we have to declare the called function above
the calling one
And this error called stack overflow is run time error not syntax.
.in class the order of function isn’t important and can use it ay where

5. important : to change the reference that pointer carries or point to it in


function we have to pass it by reference or another pointer like ordinary
variables

[Link] : if we have pointer p and point to memory in heap then


“P=NULL;” doesn’t deallocate the memory

[Link] only non const functions that can be called by const object is
constructor and destructor

You might also like