0

Initially, array declared with zero. Still, the compiler is not throwing error.

int x_var[0];
cout<<"Hello World"<<x_var[0]<<endl; // <<<<<<<<<<<< prints random number

x_var[0]=1;                          // >>>>> compiler is not throwing error.
                                     // But initialized array as zero.It must throw error
cout<<"Hello World"<<x_var[0]<<endl; // <<<<<<<<<<<<Prints value 1
Support Ukraine
  • 39,592
  • 4
  • 35
  • 56
Manju
  • 73
  • 4

0 Answers0