C++ Programming - Functions - Discussion
Discussion Forum : Functions - General Questions (Q.No. 11)
11.
Where the default value of parameter have to be specified?
Discussion:
11 comments Page 2 of 2.
Nidhi said:
1 decade ago
It should be D
becoz both are allowed
its our choice to go for B or C
void ret(int a,int b,int c);
void ret(int a,int b,int c=20)
{cout<<c<<endl;}
OR
void ret(int a,int b,int c=20);
void ret(int a,int b,int c)
{cout<<c<<endl;}
becoz both are allowed
its our choice to go for B or C
void ret(int a,int b,int c);
void ret(int a,int b,int c=20)
{cout<<c<<endl;}
OR
void ret(int a,int b,int c=20);
void ret(int a,int b,int c)
{cout<<c<<endl;}
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers