このプログラムを実行すると1回目のfunc()は呼び出されず、2回目だけ呼び出されるので、
1回目のaの値は4で2回目は5と表示されるんですが、こういうものなんですか?
論理和の仕様上、一つ目の項目を評価してfalseのときしか二つ目の項目を評価しないらしいですが
ちなみにVisual Studio 2019です

#include <iostream>
using namespace std;

int a = 4;

int func() {
a = 5;
return 3;
}

int main(void) {
int b = 2 || func();
cout << a << endl;
int c = func();
cout << a << endl;
return 0;
}