/in/foo.cc: In function 'int main()':
/in/foo.cc:18:20: warning: self-comparison always evaluates to false [-Wtautological-compare]
if(arr[i].grade > arr[i].grade)
~~~~~~~~~~~~~^~~~~~~~~~~~~~
/in/foo.cc:33:20: warning: self-comparison always evaluates to true [-Wtautological-compare]
if(arr[i].grade == arr[i].grade)
~~~~~~~~~~~~~^~~~~~~~~~~~~~~
/in/foo.cc:35:18: warning: self-comparison always evaluates to false [-Wtautological-compare]
if(arr[i].num>arr[i].num)
~~~~~~~~~~^~~~~~~~~~~
/in/foo.cc:30:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
for(i = 0;i < n;i++)
^~~
/in/foo.cc:46:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
cout<<arr[k].num<<" "<<arr[k].grade<<endl;
^~~~