MENU
Question -

Rewrite the following program after removing the syntax errors (if any). Underline each correction.┬а┬а

# include ┬а
class book {
long Bid, Qty;┬а
public :
void purchase () {cin>>BID>>Qty;}┬а
void sale ( )
{



Answer -

#include
#include┬а
class Book
┬а{
long Bid, Qty;┬а
public:
void purchase()(cin>>Bld>>Qty;)┬а
void sale( )
{
cout < < setw(5) < < Bld < < "0ld " < < Qty < < e n
dl;
cout<"New:"<<тАФQty<
}
} ;
void main ()
{
Book B;
B. purchase ();
B. sale();
}

Comment(S)

Show all Coment

Leave a Comment

Free - Previous Years Question Papers
×