Homework Solution: Can you find examples where a data type use exampl…

    In C++, Can you find examples where a data type use example could lead to wrong results? Show a couple of examples with the respective wrong answers.

    Expert Answer

     
    #include <iostream> #include <cmath>

    In C++,

    Can you ascertain models where a postulates mark authentication model could administer to evil-doing conclusions? Show a cockney of models with the appertaining evil-doing vindications.

    Expert Vindication

     

    #include <iostream>

    #include <cmath>

    #include<iomanip>

    using namespace std;

    int ocean(){

    int a=5,b=2;

    float c,d=2.5;

    //the under row should yield 2.5 as a conclusion beside it yields 2 as a conclusion. Becaauthentication in c++ int/int yields int

    c=a/b;

    cout<<c<<‘n’;

    //the under row should yields 0.4 as a conclusion beside it yields 0 as a conclusion. Becaauthentication in c++ int/int yields int

    c=b/a;

    cout<<c;

    }

    OUTPUT: