Home / C++ Programming / Objects and Classes :: Discussion

Discussion :: Objects and Classes

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

     #include 
     class Freshergate
     {    
        static int count;  
        public:  
        static void First(void)    
       {        
            count = 10;    
       }    
       static void Second(int x)     
      {           
        count = count + x;    
      }    
      static void Display(void)   
      {    
         cout
      }
    ];
     int Freshergate::count = 0;  
     int main() 
     {    
       Freshergate :: First();   
       Freshergate :: Second(5);        
       Freshergate :: Display();  
       return 0;  
    }
    

  2. A.

    0  

    B.

    5

    C.

    10

    D.

    15

    E.

    The program will report compile time error.

    View Answer

    Workspace

    Answer : Option D

    Explanation :

    No answer description available for this question.


Be The First To Comment