fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int gen_arr_4(int n)[4] {
  5. int arr[4] = {n, n + 1, n + 2, n + 3};
  6.  
  7. return arr;
  8. }
  9.  
  10. int main() {
  11. // your code goes here
  12. return 0;
  13. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:4:1: error: ‘gen_arr_4’ declared as function returning an array
 int gen_arr_4(int n)[4] {
 ^~~
stdout
Standard output is empty