Why is the result of the division of two unsigned short of type int in C++? I have created an example which can easily be tested in e.g. http://cpp.sh/
// Example program
#include <iostream>
#include <string>
#include <typeinfo>
int main(){
unsigned short a = 1;
unsigned short b = 1;
auto c = a/b;
std::cout<<"result of dividing unsigned shorts is: "<<typeid(c).name()<<std::endl;
}