Q. Consider the following code snippet.
What will be the result of this code?

Code:
function hypotenuse(p, q) 
{
       function square(n) 
       { 
            return n*n; 
       }
       return Math.sqrt(square(p) + square(q));
}
  • (A) Square of sum of p and q
  • (B) Sum of p and q square
  • (C) Sum of square of p and q
  • (D) All of above
πŸ’¬ Discuss
βœ… Correct Answer: (C) Sum of square of p and q

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
205
Total Visits
πŸ“½οΈ
4 y ago
Published
πŸŽ–οΈ
Vishal Gupta
Publisher
πŸ“ˆ
93%
Success Rate