Language:
cpp
Source:
#include <iostream>
using namespace std ;
main(){
int array[10] = {0};
cout << array[0] << "\n";
cout << array[20];}
Warnings:
source_file.cpp:3:6: warning: ISO C++ forbids declaration of ‘main’ with no type [-Wreturn-type]
main(){
^
source_file.cpp: In function ‘int main()’:
source_file.cpp:6:18: warning: ‘array[20]’ is used uninitialized in this function [-Wuninitialized]
cout << array[20];}
^
Result:
0
0
Note:
cplusplus_gcc assumed, other valid options are cplusplus_clang, visual_cplusplus, you can be more specific next time.