{}
CODE VISUALIZER
Master DSA, Python and C with step-by-step code visualization.
See it in action
CODE VISUALIZER
Master DSA, Python and C with step-by-step code visualization.
See it in action
run-icon
main.cpp
// Online C++ compiler to run C++ program online #include <iostream> const int max_size = 12; void process(const int* const* buf) { int ch = 1; int a = 0; for(int c = 0; c < ch; ++c) for (int i = 0; i < max_size; ++i) a += buf[c][i]; // ??? std::cout << a << std::endl; } int main() { int* buf = new int[max_size]; // Filling in the data: for (int i = 0; i < max_size; ++i) buf[i] += i; // We pass it to the function: process(&buf); return 0; }
Output