CBSE (Science) Class 12CBSE
Share
Notifications

View all notifications

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. - CBSE (Science) Class 12 - Computer Science (C++)

Login
Create free account


      Forgot password?

Question

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;
}

Solution

void main()
{
     cout<<"Enter an Alphabate:";
     cin>>CH;
     switch(CH)
     {
          case :'A' cout<<"Ant"; Break;
          case :'B' cout<<"Bear: ; Break; 
     }
}
  Is there an error in this question or solution?

APPEARS IN

Solution 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. Concept: Concept of Object Oriented Programming in C++.
S
View in app×