Question
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int i = 3;
6.
int l = i / -2;
7.
int k = i % -2;
8.
cout
What will be output of this program?
1.
#include
2.
using namespace std;
3.
int main()
4.
{
5.
int i = 3;
6.
int l = i / -2;
7.
int k = i % -2;
8.
cout
Answer: Option B
Was this answer helpful ?
Sign of result of mod operation on negative numbers is sign of the dividend.
Was this answer helpful ?
More Questions on This Topic :
Question 7.
The size_t integer type in C++ is?
....
Submit Solution