An array’s ptr
property in D
returns the pointer of an array’s first element.
array.ptr
The value returned is a pointer value of the array’s first element.
// import std.stdioimport std.stdio;// main methodvoid main(string[] args) {// create an arraystring[3] languages;// add valueslanguages[0] = "D";languages[1] = "Swift";languages[2] = "C#";// print the pointer of first elementwriteln(languages.ptr);}