-
What will be output of this program?
#include
using namespace std;
int main()
{
int num = 5;
int num0 = num / -10;
int num1 = num % -10;
cout << num0 << " "<< num1;
return 0;
}
-
- Compilation Error
- Runtime Error
- 0 5
- 5 0
- None of these
Correct Option: C
Sign of result of mod operation on negative numbers is sign of the dividend.