Why this code gives run time error on mid calculation?

  c++, c++11
int main() {
    int start = 0;
    int end = 2;
    int ret1 = 0;
    int mid = start + (end-start)/2;
    ret1 = mid;

    return ret1;
}

Why is this code giving runtime error?
https://ideone.com/iAdQO0

Source: Windows Questions C++

LEAVE A COMMENT