Home / C++ Programming / Functions - C++ :: Discussion

Discussion :: Functions - C++

  1. What will be the output of the following program?

      #include
      void MyFunction(int a, int b = 40) 
      {   
          cout" a = "" b = "
      }
       int main() 
      {   
         MyFunction(20, 30);   
         return 0; 
      }
    

  2. A.

    a = 20 b = 40

    B.

    a = 20 b = 30

    C.

    a = 20 b = Garbage

    D.

    a = Garbage b = 40

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment