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

Discussion :: Objects and Classes

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

     #include
     #include 
     class Freshergate
     {
         int val;    
         public:   
         void SetValue(char *str1, char *str2)  
         {         
             val = strcspn(str1, str2);   
         }     
         void ShowValue()    
         {    
             coutint main() 
      };  
      int main()
      }    
          Freshergate objgate;  
          objgate.SetValue((char*)"Fresher", (char*)"Gate");          
          objgate.ShowValue();  
          return 0; 
      }
    

  2. A.

    2

    B.

    3

    C.

    5

    D.

    8

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    No answer description available for this question.


Be The First To Comment