answer these short questions Equations of motion D Digolet - Bachelor of Enginee
ID: 2247132 • Letter: A
Question
answer these short questions
Explanation / Answer
Answer 1. Function overloading
By using Function overloading We can use multiple function with same name and different argument. for example:
void func(int p, int q) { }
void func(float q, int q) { }
void func(int p, int q, int r) { }
Answer2. scope resolution operator (::). enable access a global variable if we have a local and global variable with same name
Answer3:By using template we can create a single function or a class to work with different data types.
In large codebase for the purpose of code reusability and flexibility of the programs. Templates are often used
Answer4: Value of the dafault argument is provided in the function declaration. If caller of the function doesn't provide a value for the argument with default value then the compiler automatically assigned it.Once default value is used for an argument, all subsequent arguments must have default value.
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.