Difference between ANSI C and C++
Answer:
ANSI C | C++ |
---|---|
Uses K&R C default function declaration for any functions that are referred before their declaration in the program. | Requires that all functions must be declared/defined before they can be referenced. |
int foo(); ANSI C treats this as old C function declaration & interprets it as declared in the following manner. int foo(........); => meaning that foo may be called with any number of arguments. |
int foo(); C++ treats this as int foo(void); Meaning that foo may not accept any arguments. |
Does not employ type_safe linkage technique and does not catch user errors. | Encrypts external function names for type_safe linkage. Thus reports any user errors. |
Note:
**ANSI C and C programming are not identical.**
No comments:
For Query and doubts!