prog.cpp:4: error: array bound is not an integer constant
prog.cpp: In function ‘int main()’:
prog.cpp:7: warning: format ‘%d’ expects type ‘int*’, but argument 2 has type ‘int’
prog.cpp:9: warning: suggest parentheses around assignment used as truth value
prog.cpp:11: error: ‘g’ was not declared in this scope
prog.cpp:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result
prog.cpp:8: warning: ignoring return value of ‘void* malloc(size_t)’, declared with attribute warn_unused_result