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

Discussion :: Functions - C++

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

      #include
      typedef void(*FunPtr)(int); 
      int Look(int = 10, int = 20);
      void Note(int); 
      int main()
      {
         FunPtr ptr = Note;   
         (*ptr)(30);    
         return 0; 
     } 
     int Look(int x, int y) 
     {  
        return(x + y % 20); 
     } 
     void Note(int x) 
    {   
       cout

  2. A.

    10

    B.

    20

    C.

    30

    D.

    40

    E.

    Compilation fails.

    View Answer

    Workspace

    Answer : Option C

    Explanation :

    No answer description available for this question.


Be The First To Comment