Trusted by millions of Kenyans
Study resources on Kenyaplex

Get ready-made curriculum aligned revision materials

Exam papers, notes, holiday assignments and topical questions – all aligned to the Kenyan curriculum.

What is the general forms of new that is used to initialize a dynamic variable? Give a correct example.

What is the general forms of new that is used to initialize a dynamic variable? Give a correct example.

Answers


Davis
The general form of new that includes an initializer is ;
p-var=new type (initializer);
For example, this allocates an integer an gives it the value 10;
into *p;
p = new into (10);
Githiari answered the question on February 4, 2018 at 12:40

Answer Attachments

Exams With Marking Schemes

Related Questions