c programming test

What will happen when we use void in argument passing?

a) It will not return value to its caller
b) It will return value to its caller
c) Maybe or maynot be return any value to its caller
d) None of the mentioned

What is the output of this program?

  1.     #include <iostream>
  2.     using namespace std;
  3.     void Sum(int a, int b, int & c)
  4.     {
  5.         a = b + c;
  6.         b = a + c;
  7.         c = a + b;
  8.     }
  9.     int main()
  10.     {
  11.         int x = 2, y =3;
  12.         Sum(x, y, y);
  13.         cout << x << " " << y;
  14.         return 0; 
  15.     }

a) 2 3
b) 6 9
c) 2 15
d) compile time error

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.