1.      Write the C++ program statements which performs the following:

a)      Declare an array named string large enough to hold 100 characters

b)      Declare a pointer named name that pertains to characters.

c)      Read a name (can contain spaces) from the console. The name is stored in string.

d)     Dynamically allocate name so it is large enough to hold exactly the name entered in c).

e)      Initialize name with the string read from the console.

Source link

Leave a Reply

Your email address will not be published.