Interview Questions

What is the output of this code?def test(func, arg):
  return func(func(arg))

def mult(x):
  return x * x
print(test(mult, 2))
 
#include <stdio.h>

int main() {
 int num1,num2,sum=0;
 printf("Enter the first Number: \n");
 scanf("%d",&num1);
 printf("Enter the second Number: \n");
 scanf("%d",&num2);
 sum=num1+num2;
 printf("Sum of the two Numbers is: %d",sum);
 return 0;
}                                                                                                                                                            Run Code






No comments: