Oops 2
Oops 2
Oops 2
Using C++
OOPS Using
OOPS Using C++
C++ 1
1
Functions in C++
• A function declaration.
• All functions must be declared (prototyped)
(anywhere) before its use. e.g.
return_type function name (argument-list);
• Argument list has structure as
(data type1, datatype2, data type3)
• Names for arguments are not required while
declaring it (they don’t have to be matched with
names used for definition or call)
OOPS Using
OOPS Using C++
C++ 2
2
• All library functions used in a program has
prototypes and definitions in header files
included.
• Compiler uses prototype to check number
and types of arguments used, while calling
that function.
name is default
no is23