Classic programming interview questions
Is the signature of the function imposed ? Your solution would work for any kind of iterable objects and would be probably more idiomatic than passing a pointer and a size. Also, the logic would work for any (comparable) types and not just int so it might be worth making it a templated function.
In your search of the most common element, do you want to return the number of occurences or the element itself ?
In your sum of the two biggest, I think you can compare to largest only once.


You just need to do something like :

   if (arr[i] &gt; secondLargest) {
       if (arr[i] &gt; largest) { 
           secondLargest = largest; 
           largest = arr[i];
       } else {
           secondLargest = arr[i]; 
       }
   }