Which of the following is an invalid initialization?

A. char code = "b";
B. int i = 14;
C. long long = 1000000000;
D. float payRate = 14.25;
E. double pi = 3.1415926536;

Answer: A

Computer Science & Information Technology

You might also like to view...

The ________ creates a customizable form that displays the data in a form in both Form view and Datasheet view at the same time

Fill in the blank(s) with correct word

Computer Science & Information Technology

We reproduce the class Money here, in part:

``` class Money { public: Money( ); Money(int theDollar, int theCents); Money(int theDollars); Money(double amount);// other public members int getCents( ) const; int getDollars( ) const;private: int dollars; int cents;// other private members};Note that * is not overloaded in the class, but operator + is overloaded using an operator function with the following declaration: Money const operator+(const Money& amt1, const Money& amt2) ``` The question is, given the declarations, ``` Money baseAmount(100, 60); // $100.60 Money fullAmount; ``` which of the following operations are legal? If so, why? If not, why not? a)``` BaseAmount + 25; ``` B. ``` 25 + BaseAmount; ``` C. ``` baseAmount = 2 * baseAmount; ``` D. ``` baseAmount+baseAmount.

Computer Science & Information Technology