Answer to Question #199965 in Algorithms for Abdul Basit

Question #199965

Fill an array with digits 1,2,3,4,5. In c++


1
Expert's answer
2021-05-28T06:16:17-0400
#include <array>

int main() {

  auto buffer = std::array<int, 5>();

  for (int i = 0; i < 5; ++i)
    buffer[i] = i + 1;

  return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS