Compilation

Question 1
What error would the following function given on compilation?
f(int a, int b)
{
int a;
a=20;
return a;
}
A
Missing parenthesis is return statement
B
Function should be defined as int f(int a, int b)
C
Redeclaration of a
D
None of these
Question 1 Explanation: 
We are already declared variable name ‘a’ in function. Again we are declared inside the function. So, the compiler will raise a error “Redeclaration of a”
There is 1 question to complete.

Access quiz wise question and answers by becoming as a solutions adda PRO SUBSCRIBER with Ad-Free content

Register Now

If you have registered and made your payment please contact solutionsadda.in@gmail.com to get access