fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int m1[]={0,2,4,6};
  5. int m2[]={1,3,5,7};
  6.  
  7. int (*fun)int n))[end (m1)-begin (m1)]{
  8. return (n%2!=0 ) ? &m1 : m2;}
  9.  
  10. int main (){
  11. int c;
  12. cin>>c;
  13. //int (*p)[sizeof (m1)/sizeof (m1[0])]=fun (c);
  14. int (*p)[end (m1)-begin (m1)]=fun (c);
  15. cout <<*p;
  16. }
  17.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:7:11: error: expected initializer before ‘int’
 int (*fun)int n))[end (m1)-begin (m1)]{
           ^~~
prog.cpp: In function ‘int main()’:
prog.cpp:14:38: error: ‘fun’ was not declared in this scope
  int (*p)[end (m1)-begin (m1)]=fun (c);
                                      ^
stdout
Standard output is empty