Course Solutions Uncategorized (Solved) : 31 Following Code Segment Syntactically Correct Struct Names String First Last Int Main Na Q38187882 . . . .

(Solved) : 31 Following Code Segment Syntactically Correct Struct Names String First Last Int Main Na Q38187882 . . . .

 

31. The following code-segment is syntactically correct:

struct Names{string first, last;};
int main()
{
Names customer (“Orley”, “Smith”);
cout << Names.first << endl;   
cout << Names.last << endl;
}

T__ F__

32. struct AUTO
{
int year;
char make[20];
};

Which statement correctly declares and initializes the
structure variables ?

a. struct AUTO car = 1990, ‘F’, ‘o’, ‘r’, ‘d’;
b. struct AUTO { 1990, “Ford” } car;
c. struct AUTO car = 1990, strcpy( make, “Ford” );
d. struct AUTO car { 1990, “Ford” };   

33. The following implementation is syntactically incorrect:

class A
{
public:
   void foo() { }
};

int main(){
A *p, obj;
obj.foo();    
p = {&obj};  
p->foo(); }
T__ F__
34. The following array definition is valid:

int numbers [10] = {0,0,1,0,0,1,0,0,1,1};

T__ F__

35. The

OR

PayPal Gateway not configured

OR

PayPal Gateway not configured

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

(Solved) : 1 Consider Program M 0 N N 2 Od Write Hoare Triple Capturing Meaning Program Positive M Ex Q29263994 . . . .(Solved) : 1 Consider Program M 0 N N 2 Od Write Hoare Triple Capturing Meaning Program Positive M Ex Q29263994 . . . .

<br/><img src="https://media.cheggcdn.com/media%2Ffbe%2Ffbe94d8a-14af-4b63-9163-43104e28c04b%2Fimage" alt="1. Consider the program: while (m>0) do n :# n+2; od: Write a Hoare triple capturing the meaning of this program for positive m. For example if the