What do you want to save?
Add Code snippet
New code examples
-
C++ 2021-10-08 21:54:10
malloc c++ example
#include <iostream> #include <cstdlib> using namespace std; int main() { int *ptr; ptr = (int*) malloc(5*sizeof(int)); if(!ptr) { cout << "Memory Allocation Failed"; exit(1); } cout << "Initializing value... Add solution