©2020 by Arturo Devesa.



AI Lead | Machine Learning Engineer | Tech Manager | Innovator

I'm a technology enthusiast with over 15 years of experience working in academia, startups, and corporations. Learn more on my blog



I'm passionate about entrepreneurship, technology, artificial intelligence, programming, startups, teaching, research, business and innovation. I have been keynote speaker in multiple events worldwide about AI and startups. I've been involved with Florida Atlantic University and Stanford University. I've also worked with Microsoft and Orange Telecom in various forms. I have a lot of of experience but I feel I have little because the more I learn, the more I realize what I don't know and the more I want to keep learning. I love learning new challenging things. My new addition to that continuing learning is Quantum Physics and Quantum Computing for AI.


Dynamic Memory Allocation Example on C++

#include <iostream>

using namespace std;

int *create_array(size_t size, int init_value = 0) {

int *new_storage {nullptr};

new_storage = new int[size];

for (size_t i{0}; i < size; ++i)

*(new_storage + i) = init_value;

return new_storage;


void display(const int *const array, size_t size) {

for (size_t i{0}; i < size; ++i)

cout << array[i] << " ";

cout << endl;


int main() {

int *my_array {nullptr};

size_t size;

int init_value {};

cout << "\nHow many integers would you like to allocate? ";

cin >> size;

cout << "What value would you like them initialized to? ";

cin >> init_value;

my_array = create_array(size, init_value);

cout << "\n--------------------------------------" << endl;

display(my_array, size);

delete [] my_array;

return 0;