Advertisement Remove all ads

Rewrite the Following C++ Code After Removing Any/All Syntactical Errors with Each Correction Underlined. Note: Assume All Required Header Files Are Already Being Included in the Program. - Computer Science (C++)

Rewrite the following C++ code after removing any/all syntactical errors with each correction underlined.

Note: Assume all required header files are already being included in the program.

void main()
{
     cout<<"Enter an Alphabet:" ;
     cin>>CB ;
     switch(CH)
     case 'A' · cout<<"Ant"; Break ;
     case 'B' · cout<<"Bear"; Break;
}
Advertisement Remove all ads

Solution

void main()
{
     cout<<"Enter an Alphabate:";
     cin>>CH;
     switch(CH)
     {
          case :'A' cout<<"Ant"; Break;
          case :'B' cout<<"Bear: ; Break; 
     }
}
Concept: Concept of Object Oriented Programming in C++
  Is there an error in this question or solution?
Advertisement Remove all ads
Advertisement Remove all ads
Advertisement Remove all ads
Share
Notifications

View all notifications


      Forgot password?
View in app×