Prepare
Practice
Interview
Aptitude
Reasoning
English
GD
Placement papers
HR
Current affairs
Engineering
MCA
MBA
Online test
Login
Default values for function are specified from left to right only - Functions
Home
>>
Category
>>
C++ (MCQ) questions and answers
>>
Functions
Q. Default values for a function are need to be specified from left to right only.
- Published on 17 Jul 15
a.
True
b.
False
ANSWER: False
Related Content
Constructor and Destructor (
10
)
Operator Overloading (
11
)
Inheritance (
16
)
Polymorphism and Abstract Classes (
12
)
C++ basic concepts (
39
)
Exception Handling (
22
)
File Handling (
11
)
Functions (
20
)
Memory Management (
6
)
Pointers (
3
)
Discussion
Raj
-Posted on 09 Oct 15
Default values for a function are need to be specified from left to right only is false statement.
Default value in a function as an argument should be right to left.
For example consider the following function prototype.
Int myFunction (int Parameter1, int Parameter2, int Parameter3);
You can assign a default value to Parameter2 only if you have assigned a default value to Parameter3. You can assign a default value to Parameter1 only if you have assigned default values to both Parameter2 and Parameter3.
➨
Post your comment / Share knowledge
Required!
Required!
Invalid Email Id!
Required!
Enter the code shown above:
Please enter the code shown above
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)
MCQs
English
Tutorials
Download
▲