Logo 
Search:

C++ Programming FAQ

Submit Interview FAQ
Home » Interview FAQ » C++ ProgrammingRSS Feeds

Identify the variables, which are local to the following function

  Shared By: Adalgar Fischer    Date: Nov 08    Category: C++ Programming    Views: 1283

Answer:

int calc(int p, int n)
{
int q;
q=pow(p,n);
return(q);
}


Options

a) p and n
b) p,n, and q
c) q
d) Cannot be determined without the main() function


Answer : b) p,n, and q

Share: 
 


Related Topics:

Your Comment
  • Comment should be atleast 30 Characters.
  • Please put code inside [Code] your code [/Code].


Tagged: