Wednesday, August 14, 2019

SRM ELAB SOLUTUIONS OOPS


OBJECT ORIENTED PROGRAMING SYSTEM

           




                                  I/O Operations
                           Classes Functions and Constructors

243 comments:

  1. Replies
    1. hey RAM are you going home for this dussehra?

      Delete
  2. the progrms are not showing any %

    ReplyDelete
    Replies
    1. SESSION: Classes Functions and Constructors
      Q. 12: Bhagavan the Inspirational Teacher
      QUESTION DESCRIPTION

      Bhagavan the Government school teacher from Karur district is so involved with his students development which in turn even forced the Tamilnadu Educational department to cancel his transfer from his old school on the request of his students.

      He is such an inspirational teacher.Now he has been assigned the new set of students from other schools to train them.So before starting the training he wants to collect the personal details from the new student for maintaining the record in his school.

      Can you help him to automate his task of collecting student details?

      Mandatory:

      1.Create a class "student"

      2.Create the following datamembers:
      a)roll,
      b)name,
      c)height and
      d)weight.

      3.Create a DEFAULT CONSTRUCTOR to assign the values to the above data members as follows:
      name="Bhagavan"; roll=1593; height=172.5; weight=60.4;

      4.Create a member function readinput() to get the values from the above members

      5.Create a member function displaydata() to print the information collected from the students.

      6.Create two objects s1 and s2.Call the member function readinput() only with s1 and displaydata() with s1 and s2.

      Refer sample testcases
      TEST CASE 1

      INPUT
      Manikandan 156 168.5 65.3
      OUTPUT
      Manikandan 156 168.5 65.3
      Bhagavan 1593 172.5 60.4
      TEST CASE 2

      INPUT
      Maheshwaran 157 162.1 68.1
      OUTPUT
      Maheshwaran 157 162.1 68.1
      Bhagavan 1593 172.5 60.4

      Delete
    2. #include
      using namespace std;

      class Student{
      public:
      int roll;
      string name;
      float height,weight;
      void readinput();
      void displaydata();
      Student(){
      name = "Bhagavan";
      roll = 1593;
      height = 172.5;
      weight = 60.4;
      }
      };

      void Student::readinput(){
      cin>>name>>roll>>height>>weight;
      }

      void Student::displaydata()
      {
      cout<<name<<" "<<roll<<" "<<height<<" "<<weight;
      }

      int main() {
      Student s1,s2;
      s1.readinput();
      s1.displaydata();
      cout<<endl;
      s2.displaydata();
      return 0;
      }

      Delete
    3. complete the include header file

      Delete
  3. #include
    #include
    using namespace std;
    int main() {
    int t=2;
    while(t)
    { char b[100];
    int i=0;
    cin.getline(b,30);
    cout.write(b,5);
    cout<<endl;
    t--;
    }
    return 0;
    }
    iost11

    ReplyDelete
    Replies
    1. This comment has been removed by a blog administrator.

      Delete
  4. This comment has been removed by a blog administrator.

    ReplyDelete
  5. #include
    using namespace std;
    class salary
    {int deftsalary;
    public:
    salary()
    {deftsalary=10000;
    cout<>Testclass;
    salary myobj2(Testclass);
    return 0;
    }

    Function and Constructor Overloading :: Dhoni the CEO

    ReplyDelete
    Replies
    1. #include
      using namespace std;
      class salary
      {int deftsalary;
      public:
      salary()
      {deftsalary=10000;
      cout<>Testclass;
      salary myobj2(Testclass);
      return 0;
      }

      Delete
  6. #include
    #include
    using namespace std;
    class Student
    {
    char stuname[20];
    public:
    Student()
    {
    cout<<"No Attendance";
    }
    Student(char name[])
    {
    strcpy(stuname,name);
    }
    void display()
    {
    cout<<"\nHello "<>new_name;
    Student stdpst(new_name);
    stdpst.display();
    return 0;
    }
    Function and Constructor Overloading: anti-proxy attendance

    ReplyDelete
  7. limka book of record is giving me 77% evaluation

    ReplyDelete
  8. #include
    using namespace std;
    template
    void displayresult(t1 a,t2 b){
    cout<>x>>y;
    cout<<x<<endl<<y<<endl;
    displayresult(x,y);
    return 0;
    }

    ReplyDelete
  9. #include
    using namespace std;
    // template function
    template
    T Large(T n1, T n2)
    {
    return (n1 > n2) ? n1 : n2;
    }
    int main()
    {
    int i1, i2;
    float f1, f2;
    cin >> i1 >> i2;
    cout << Large(i1, i2)<< endl;
    cin >> f1 >> f2;
    cout << Large(f1, f2);

    return 0;
    }

    ReplyDelete
  10. #include
    using namespace std;
    int r1,r2,i1,i2;
    class complex{

    public:

    friend void sum(complex);
    void display(){
    cout<>r1;
    cin>>i1;
    cin>>r2;
    cin>>i2;
    }
    int main(){
    complex o;
    sum(o);
    o.display();
    return 0;
    }

    ReplyDelete
  11. Function and Constructor Overloading
    Srm Admission
    Store Keeper

    ReplyDelete
    Replies
    1. we are trying to find code after getting the code i will publish bro if you get before than me then comment the question name and the program it will use full for other

      Delete
  12. pls...upload all the programs

    ReplyDelete
  13. Need program for hospital bill......pls upload asap

    ReplyDelete
  14. Need program for hospital bill......pls upload asap

    ReplyDelete
  15. I/O Operations:-Scientist Game
    #include
    using namespace std;
    int main()
    {
    int origNum, num, rem, sum = 0;
    cin >> origNum;
    num = origNum;
    while(num != 0)
    {
    rem = num % 10;
    sum += rem * rem * rem;
    num /= 10;
    }
    if(sum == origNum)
    cout << "Give to Scientist Armstrong";
    else
    cout<< "Dont Give to Scientist Armstrong";
    return 0;
    }

    ReplyDelete
  16. Inheritance:Payslip Generation
    #include
    using namespace std;
    class c1
    {
    public:
    int length, breadth;
    c1()
    {
    cin>>length>>breadth;
    }

    };
    class c2:public c1
    {
    public:
    void area(int length,int breadth)
    {
    cout<<2*(length+breadth);
    }
    };
    int main() {
    c2 one;
    one.area(one.length,one.breadth);

    return 0;
    }

    ReplyDelete
  17. This comment has been removed by the author.

    ReplyDelete
  18. FILL WATER NEW CODE : 100% WORKING

    #include
    using namespace std;
    class Box
    {
    double width,height,depth;
    public:
    Box()
    {
    width=0;
    height=0;
    depth=0;
    }
    Box(double w, double h, double d)
    {
    width=w;
    height=h;
    depth=d;
    }
    double volume()
    {
    return width*height*depth;
    }
    };

    int main()
    {
    Box mybox1;
    double a,vol;
    cout<>a;
    Box mybox2(a,a,a);
    vol = mybox2.volume();
    cout<<vol;
    return 0;
    }


    ReplyDelete
  19. ABSTRACT CLASS VIRTUAL FUNCTIONS

    VARUN AND HIS STUDNETS : #include
    using namespace std;

    class parent{
    public:
    virtual float average(int a, int b, int c)=0;

    };

    class child:public parent{
    public:
    float average(int a, int b, int c){
    return (a+b+c)/3.0f;
    }
    };

    int main() {

    parent *p;
    child c;
    p=&c;
    int a,b,d;
    cin>>a>>b>>d;
    cout << "Average=" << p->average(a,b,d);
    return 0;
    }

    ReplyDelete
  20. Abstract Class Virtual Function and Friend Function
    Super Market
    #include
    using namespace std;
    class consumer
    {
    public:
    virtual void getdata()=0;
    virtual void display()=0;
    };
    class transaction:public consumer
    {
    public:
    char n[100],t[100];
    int c,q,p;int tp;
    void getdata()
    {
    cin>>n>>c>>t>>q>>p;
    tp=q*p;
    }
    void display()
    {
    cout<<"Name : "<<n;
    cout<<"\nCode : "<<c;
    cout<<"\nTelephone : "<<t;
    cout<<"\nQuantity : "<<q;
    cout<<"\nPrice : "<<p;
    cout<<"\nTotal Price : "<<tp;
    }
    };
    int main()
    {
    transaction f;
    f.getdata();
    f.display();
    return 0;
    }

    ReplyDelete
  21. Abstract Class Virtual Function and Friend Function

    Difference Problem


    #include
    using namespace std;
    class parent
    {
    public:
    virtual void difference(int a,int b)=0;
    };
    class child:public parent
    {
    public:
    void difference(int a,int b)
    {
    cout<<"Difference="<>a>>b;
    p->difference(a,b);
    return 0;
    }

    ReplyDelete
  22. Abstract Class Virtual Function and Friend Function
    Kajal and her Shopping

    #include
    using namespace std;
    class Bill
    {
    public:
    int a,b;
    void getamount()
    {
    cin>>a>>b;
    }
    friend float billavg(Bill&,int,int);
    };
    float billavg(Bill& x,int a,int b)
    {
    float y;
    y=(float)(a+b);
    return y/2;
    }
    int main()
    {
    Bill obj;
    obj.getamount();
    cout<<"Average amount spent:"<<billavg(obj,obj.a,obj.b);
    return 0;
    }

    ReplyDelete
  23. Abstract Class Virtual Function and Friend Function
    District Sports Meet
    #include
    using namespace std;
    class Sports
    {
    public:
    virtual void getdata()=0;
    virtual void display()=0;
    };
    class Student:public Sports
    {
    public:
    int a;
    string b;
    void getdata()
    {
    cin>>a>>b;
    }
    void display()
    {
    cout<<"Student Name is: "<getdata();
    ptr->display();
    return 0;
    }

    ReplyDelete
  24. upload the comment programs also naa

    ReplyDelete
  25. bhagavan the inspirational teacher
    #include
    #include
    using namespace std;
    class student
    {
    string name;
    double roll,height,weight;


    public:
    void readinput()
    {
    cin>>name>>roll>>height>>weight;
    }
    void displaydata()
    {
    cout<<name<<" "<<roll<<" "<<height<<" "<<weight<<endl;
    }
    void display()
    { }
    void read()
    { }
    student()
    {
    name="Bhagavan"; roll=1593; height=172.5; weight=60.4;
    }
    };
    int main() {
    student s1,s2;
    //student s2;
    s1.readinput();
    s1.displaydata();
    s2.displaydata();
    s1.read();
    s2.display();
    return 0;
    }

    ReplyDelete
  26. Can someone post Jadeja and googly program form abstract and virtual functions

    ReplyDelete
    Replies
    1. #include
      using namespace std;

      class googly{
      int num;
      public:
      void getballnumber(){
      cin >> num;
      }
      friend int isgoogly(googly);
      };

      int isgoogly(googly g){
      if(g.num%2 == 0){
      cout << "Not a Googly Ball" << endl;
      return 0;
      }
      cout << "Googly Ball" << endl;
      return 1;
      }

      int main() {
      googly e1;
      e1.getballnumber();
      isgoogly(e1);
      return 0;
      }

      Delete
  27. IOST11

    #include
    using namespace std;
    int main()
    {
    char in1[30],in2[30];
    cin.getline(in1,30);
    cin.getline(in2,30);
    cout.write(in1,5);
    cout<<'\n';
    cout.write(in2,5);
    return 0;
    }

    thought to contribute a code here since i didn't find it and used this page to complete the E-Lab, thank you

    ReplyDelete
    Replies
    1. thank you for using this when ever you open this fuck elab next time please clear the history and open so that i will get views

      Delete
  28. plsss upload program for interface for rectangle,district sports meet and unary......

    ReplyDelete
  29. plzz give SRM ADMISSION of function and constructor overloading

    ReplyDelete
  30. plz upload unary and interface for rectangle

    ReplyDelete
    Replies
    1. we are trying to find code after getting the code i will publish bro if you get before than me then comment the question name and the program it will use full for other

      Delete
  31. Replies
    1. we are trying to find code after getting the code i will publish bro if you get before than me then comment the question name and the program it will use full for other

      Delete
  32. Replies
    1. we are trying to find code after getting the code i will publish bro if you get before than me then comment the question name and the program it will use full for other

      Delete
  33. solution for swapping two functions

    ReplyDelete
  34. anyone upload solution for unary and interface for rectangle and IOST 4 asap.....

    ReplyDelete
  35. This comment has been removed by the author.

    ReplyDelete
  36. need compare 2 strings and no exception in Exception handling

    ReplyDelete
  37. plz upload inheritance:bank , iost19

    ReplyDelete
  38. stl:marks and vector , play with sets , exceptional handling:number exceptiion

    ReplyDelete
  39. Bro there is a problem in deque code bro
    pls check it once.

    ReplyDelete
  40. Admin bro, pls upload IOST 14 as soon as possible

    ReplyDelete
    Replies
    1. we are trying to find code after getting the code i will publish bro if you get before than me then comment the question name and the program it will use full for other

      Delete
  41. iost1,iost14,iost8,iost19 please publish these programs

    ReplyDelete
  42. unary-operator overloading
    length of string,number exception-exceptional handling,
    marks and vector,play with set-STL
    please upload these programs

    ReplyDelete
    Replies
    1. we are trying to find code after getting the code i will publish bro if you get before than me then comment the question name and the program it will use full for other

      Delete
  43. IOST14, PLAY WITH STREAM, IOST8, IOST19, COMPARE TWO STRINGS

    ReplyDelete
  44. please upload iost 14,iost 19,iost 1 and iost 8 as soon as possible

    ReplyDelete
  45. Replies

    1. #include
      using namespace std;
      class Time
      {
      private:
      int hour, min;
      public:
      friend ostream & operator << (ostream &out, const Time &c);
      friend istream & operator >> (istream &in, Time &c);
      friend void operator>> (Time &hourw, Time &minw);
      };
      istream & operator >> (istream &in, Time &c)
      {
      in >> c.hour;
      in >> c.min;
      return in;
      }
      ostream & operator << (ostream &out, const Time &c)
      {
      cout << "dx="<< c.hour << " dy=" << c.min;
      return out;
      }
      int main()
      {
      Time c1;
      cin >> c1;
      cout << c1;
      return 0;
      }

      Delete
    2. This comment has been removed by the author.

      Delete
    3. it will not work it has a problem in the friend void operator>>, it need a space btwn oprtr and >>
      this will work -
      #include
      using namespace std;
      class Time
      {
      private:
      int hour, min;
      public:
      friend ostream & operator << (ostream &out, const Time &c);
      friend istream & operator >> (istream &in, Time &c);
      friend void operator >>(Time &hourw, Time &minw);
      };
      istream & operator>>(istream &in, Time &c)
      {
      in >> c.hour;
      in >> c.min;
      return in;
      }
      ostream & operator << (ostream &out, const Time &c)
      {
      cout << "dx="<< c.hour << " dy=" << c.min;
      return out;
      }
      int main()
      {
      Time c1;
      cin >> c1;
      cout << c1;
      return 0;
      }

      Delete
  46. could u please upoad solutions for iost 14,1,19

    ReplyDelete
  47. need iost10 ,iost4 ,number exception in exception handling,and measure the area is not correct

    ReplyDelete
  48. Replies
    1. #include
      #include
      #include
      using namespace std;
      int main() {
      string a;
      getline(cin,a,':');
      float f;
      cin >> f;
      stringstream my_stream(ios::in|ios::out);
      my_stream << a;
      my_stream.seekg(-7,ios::end);
      std::string dat(a);
      cout << "I have a double : " << f*f;
      return 0;
      }

      Delete
  49. Marks and Vector of STL
    Compare two strings of Exceptional Handling
    IOST4, IOST8

    ReplyDelete
  50. Please give the solution for play with set and Marks and vector of STL

    ReplyDelete
  51. Bhagavan the Inspirational Teacher

    #include
    using namespace std;
    class student
    {
    string name;
    double roll,height,weight;


    public:
    void readinput()
    {
    cin>>name>>roll>>height>>weight;
    }
    void displaydata()
    {
    cout<<name<<" "<<roll<<" "<<height<<" "<<weight<<endl;
    }
    void display()
    { }
    void read()
    { }
    student()
    {
    name="Bhagavan"; roll=1593; height=172.5; weight=60.4;
    }
    };
    int main() {
    student s1,s2;
    //student s2;
    s1.readinput();
    s1.displaydata();
    s2.displaydata();
    s1.read();
    s2.display();
    return 0;
    }

    ReplyDelete
    Replies
    1. correct code-
      #include iostream
      #include string.h
      using namespace std;
      class student{
      int roll;
      char name[20];
      float height;
      float weight;
      public:
      student()
      {
      strcpy(name,"Bhagavan");
      roll=1593;
      height=172.5;
      weight=60.4;
      }
      void readinput()
      {cin>>name;
      cin>>roll>>height>>weight;
      }
      void displaydata()
      {
      cout<<name<<" "<<roll<<" "<<height<<" "<<weight;
      }
      };


      int main() {
      student s1,s2;
      s1.readinput();
      s1.displaydata();
      cout<<endl;
      s2.displaydata();

      return 0;
      }

      Delete
  52. /***marks and vector ***/
    #include
    #include
    #include
    using namespace std;
    int main() {
    int n,num;
    cin>>n;
    vector myvector;
    for(int i=0;i>num;
    myvector.push_back(num);
    }
    cout<<*min_element(myvector.begin(),myvector.end())<<" ";
    cout<<*max_element(myvector.begin(),myvector.end());

    return 0;
    }

    ReplyDelete
  53. /*** iost 8 ***/
    #include
    using namespace std;

    class demo
    {
    public:
    int dx, dy;

    friend void operator >>(demo& d, istream& mycin)
    {
    // cin assigned to another object mycin
    mycin >> d.dx >> d.dy;
    }

    // operator overloading using friend function
    friend void operator<<(demo& d, ostream& mycout)
    {
    // cout assigned to another object mycout
    mycout << "dx="<<d.dx<< " dy="<<d.dy;

    }
    };

    int main()
    {
    demo d;
    // calls operator >> function and
    // pass d and cin as reference
    operator >> (d, cin) ;//d >> cin; // can also be written as operator >> (d, cin) ;

    // calls operator << function and
    // pass d and cout as reference
    operator << (d, cout) ;//d << cout; // can also be written as operator << (d, cout) ;
    }

    ReplyDelete
    Replies

    1. this will work -
      #include iostream
      using namespace std;
      class Time
      {
      private:
      int hour, min;
      public:
      friend ostream & operator << (ostream &out, const Time &c);
      friend istream & operator >> (istream &in, Time &c);
      friend void operator >>(Time &hourw, Time &minw);
      };
      istream & operator>>(istream &in, Time &c)
      {
      in >> c.hour;
      in >> c.min;
      return in;
      }
      ostream & operator << (ostream &out, const Time &c)
      {
      cout << "dx="<< c.hour << " dy=" << c.min;
      return out;
      }
      int main()
      {
      Time c1;
      cin >> c1;
      cout << c1;
      return 0;
      }

      Delete
  54. Replies
    1. #include
      #include
      using namespace std;
      int main()
      {
      int n,i,k,x=20,c=1;
      long double ans,s=1;
      cin>>n;
      for(i=1;i<=n;i++)
      {
      ans=s*c;
      cout.width(n);
      cout.setf(ios::fixed);
      cout.precision(0);
      cout<<ans<<"\n";
      s=ans;
      c++;
      }
      return 0;
      }

      Delete
    2. This comment has been removed by the author.

      Delete
  55. IOST 1,14 and 19. please try for these

    ReplyDelete
  56. iost 14
    #include
    using namespace std;

    int main()
    {
    float n;
    float pi;
    cin >> n;
    int i = 0;
    int n1 = n;
    while (n > 0)
    {
    pi=(float)22/7;
    cout.precision(n);
    cout << pi;
    while (i)
    {
    cout << '*';
    i--;
    }
    i = n1 - n + 1;
    n--;
    cout << endl;
    }
    cout << "3" << endl
    << "Fill Setting:*";

    return 0;
    }
    void d()
    {
    cout.fill('a');
    cout.width(10);
    }

    iost 19
    #include
    #include
    using namespace std;
    int main()
    {
    int n,i,k,x=20,c=1;
    long double ans,s=1;
    cin>>n;
    for(i=1;i<=n;i++)
    {
    ans=s*c;
    cout.width(n);
    cout.setf(ios::fixed);
    cout.precision(0);
    cout<<ans<<"\n";
    s=ans;
    c++;
    }
    return 0;
    }

    ReplyDelete
  57. This comment has been removed by the author.

    ReplyDelete
  58. someone please upload solution for the following questions from EXCEPTIONAL HANDLING :
    Compare two strings
    Number exception
    Length of String

    ReplyDelete
    Replies
    1. #include iostream
      #include string.h

      using namespace std;
      int main() {
      char ch[10],ch1[10];
      cin>>ch>>ch1;
      try
      {for(int i=0;i48&&ch[i]<57)
      throw ch[i];
      for(int i=0;i48&&ch1[i]<57)
      throw ch1[i];
      if(strcmp(ch,ch1)!=0)
      cout<<ch<<" is not "<<ch1;
      else
      cout<<ch<<" is "<<ch1;
      }
      catch(char ch)
      {
      cout<<"Invalid input Try again";
      }

      return 0;
      }

      Delete
    2. this is correct. just remove i48 and run the code

      Delete
  59. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
    2. This comment has been removed by the author.

      Delete
    3. There is some error in the code

      Delete
    4. i know that was compare 2 functions from stl

      Delete
  60. Please upload Play with Streams, Number Exception using Exceptional Handling and Saravana Stores.

    ReplyDelete
    Replies
    1. Play with Streams
      #include iostream
      #include set
      #include iterator
      using namespace std;
      int main() {
      set ob;
      int n;
      cin>>n;
      int t;
      for(int i=0;i>t;
      ob.insert(t);
      }


      cin>>t;
      int g=*ob.find(t);
      if(g==t)
      cout<<"Element "< onj(ob.begin(),ob.end());
      set::iterator it;
      for(it=ob.begin();it!=ob.end();++it)
      {
      cout<<*it<<" ";
      }
      cout<<endl;
      cout<<"Size=";
      t=ob.size();
      cout<<t;
      return 0;
      }

      Delete
    2. Saravana Stores
      #include iostream
      using namespace std;
      class Salary
      {public:
      int Increment(int currsal)
      {
      }
      int Increment(int currsal,int bonus)
      {
      int x,y;
      x=currsal;
      y=bonus;
      cout<>a>>b;
      Salary ob;
      //ob.Increment();
      ob.Increment(a,b);
      return 0;
      }

      Delete
    3. compile time error Play with Streams

      Delete
  61. #include
    #include
    #include
    using namespace std;
    int main() {
    string a;
    getline(cin,a,':');
    float f;
    cin >> f;
    stringstream my_stream(ios::in|ios::out);
    my_stream << a;
    my_stream.seekg(-7,ios::end);
    std::string dat(a);
    cout << "I have a double : " << f*f;
    return 0;
    }

    ReplyDelete
    Replies
    1. 100% not evaluating.
      test case 2 and 4 are not passing after removing space after : in
      cout << "I have a double : " << f*f;

      Delete
  62. Arulmozhivarman and his pets program pls

    ReplyDelete
    Replies
    1. #include
      using namespace std;
      class catanddog
      {
      public:
      int n,i,a,b,c;

      void count()
      {
      cin>>n;
      for(i=0;i>a>>b>>c;
      if(c==8 || c==4)
      cout<<"yes"<<"\n";
      else
      cout<<"no"<<"\n";
      }
      }
      };
      int main()
      {
      catanddog obj;
      obj.count();
      return 0;
      }

      Delete
  63. Please upload Number Exception using Exceptional Handling

    ReplyDelete
  64. Please upload for compare two strings

    ReplyDelete
  65. Number Exception using Exceptional Handling and Arulmozhivarman and his pets program pls else ask any program u will get the ans

    ReplyDelete
  66. i need iost4,iost19,iost1,remove duplicate,swapping two functions,vowels of exception handling

    ReplyDelete
    Replies
    1. swapping two functions
      #include iostream
      #include stack
      #include vector
      #include algorithm
      using namespace std;
      using std::stack;
      using std::reverse;
      void showstack(stacki)
      {
      while (!i.empty())
      {
      cout << i.top()<<" ";
      i.pop();
      }
      cout << '\n';
      }
      int main()
      {
      vectori;
      vectorj;
      std::stackI;
      std::stackJ;
      int a,b;
      cin>>a;
      for(int k=0;k>b;
      I.push(b);
      }
      for(int k=0;k>b;
      J.push(b);
      }
      showstack(J);
      showstack(I);
      reverse(i.begin(),i.end());
      reverse(j.begin(),j.end());
      return 0;
      }

      Delete
    2. Bro did you get Swapping two functions code?

      Delete
  67. This comment has been removed by the author.

    ReplyDelete
  68. bro search above for iost 19, 1, 4

    ReplyDelete
    Replies
    1. Please repost iost4 . I am not able to find it. I checked most of the comments

      Delete
  69. Arulmozhivarman and his pets program pls

    ReplyDelete
    Replies
    1. #include iostream
      using namespace std;
      class catanddog
      {
      public:
      int n,i,a,b,c;

      void count()
      {
      cin>>n;
      for(i=0;i>a>>b>>c;
      if(c==8 || c==4)
      cout<<"yes"<<"\n";
      else
      cout<<"no"<<"\n";
      }
      }
      };
      int main()
      {
      catanddog obj;
      obj.count();
      return 0;
      }

      Delete
    2. cin>>n;
      for(i=0;i>a>>b>>c;
      how can this be possible pls rectify it

      Delete
  70. Replies
    1. iost 18 is already given in the portal
      iost 8 running 100% garantee
      #include iostream
      using namespace std;
      class Time
      {
      private:
      int hour, min;
      public:
      friend ostream & operator << (ostream &out, const Time &c);
      friend istream & operator >> (istream &in, Time &c);
      friend void operator >>(Time &hourw, Time &minw);
      };
      istream & operator>>(istream &in, Time &c)
      {
      in >> c.hour;
      in >> c.min;
      return in;
      }
      ostream & operator << (ostream &out, const Time &c)
      {
      cout << "dx="<< c.hour << " dy=" << c.min;
      return out;
      }
      int main()
      {
      Time c1;
      cin >> c1;
      cout << c1;
      return 0;
      }/*
      //***2nd method***
      #include
      using namespace std;

      class demo
      {
      public:
      int dx, dy;

      friend void operator >>(demo& d, istream& mycin)
      {
      // cin assigned to another object mycin
      mycin >> d.dx >> d.dy;
      }

      // operator overloading using friend function
      friend void operator<<(demo& d, ostream& mycout)
      {
      // cout assigned to another object mycout
      mycout << "dx="<<d.dx<< " dy="<<d.dy;

      }
      };

      int main()
      {
      demo d;
      // calls operator >> function and
      // pass d and cin as reference
      operator >> (d, cin) ;//d >> cin; // can also be written as operator >> (d, cin) ;

      // calls operator << function and
      // pass d and cout as reference
      operator << (d, cout) ;//d << cout; // can also be written as operator << (d, cout) ;
      } */

      Delete
  71. Replies
    1. #include iostream
      using namespace std;
      int main()
      {
      char ch;
      while(cin.get(ch))
      {
      while(cin.peek()=='#')
      {
      cin.ignore(1,'#');
      }
      cout<<ch;
      }
      return 0;
      }

      Delete
    2. find me this pls Arulmozhivarman and his pets

      Delete
    3. #include
      using namespace std;
      class catanddog
      {int C,D,L;
      public:
      void count()
      {cin>>C>>D>>L;


      if(L%4==0&&D+C>=L/4)
      cout<<"yes"<>T;
      for(int i=0;i<T;i++)
      obj.count();
      return 0;
      }

      Delete
    4. Arulmozhivarman and his pets code

      Delete
  72. //iost10

    #include
    #include
    using namespace std;
    int main() {
    char x[50];int a;
    cin.getline(x,50);
    cout<<"Your string is :"<<x<<endl;
    for(a=0;a<=strlen(x);a++)
    {cout.write(x,a);cout<<endl;}
    return 0;
    }

    ReplyDelete
  73. bro plz send length of string,sets,marks and vector,and vector iterator

    ReplyDelete
  74. please upload Play with Streams with 100% evaluation.

    ReplyDelete
  75. Marks and vector ,play with sets...can anyone send this two plz??

    ReplyDelete
  76. Can somebody give the program for "Swapping two Functions"?

    ReplyDelete
  77. This comment has been removed by the author.

    ReplyDelete
  78. Play with fraction (code in blogspot doesnt give 100%) - Operator Overloading
    Marks and Vector - STL
    Play with Set - STL
    :)

    ReplyDelete
  79. pls upload unary,athithya karikalan and his hobby,compare two strings,swapping two functions and play with set asap.....

    ReplyDelete
  80. IOST14,IOST19,IOST1,IOST4
    pls upload these.....

    ReplyDelete
  81. IOST 4 is not there

    ReplyDelete
  82. please upload limka book of records in function and constructor overloading

    ReplyDelete
  83. please upload IOST 10 AND IOST 1 / COMPARE TWO STRINGS / SWAPPING OF TWO FUNCTIONS / NUMBER EXPECTION / UNARY / BANK

    ReplyDelete
    Replies
    1. //IOST 10
      #include
      #include
      using namespace std;
      int main() {
      char x[256];
      int a,b;
      cin.getline(x,256);
      cout<<"Your string is :"<<x<<"\n";
      for(a=0;a<=strlen(x);a++)
      {

      cout.write(x,a);
      cout<<"\n";
      }
      return 0;
      }

      Delete
  84. This comment has been removed by the author.

    ReplyDelete
  85. bro plsssssss repost .. 'IOST 4' and 'marks and vector'

    ReplyDelete
  86. bro marks and vector(the above one you sent isnt working)

    ReplyDelete
  87. Arulmozhivarman and his pets code

    #include iostream
    using namespace std;
    struct cd
    { int c,d,l;
    };
    class catanddog
    { public:
    cd d[100];
    int i,t;
    void get()
    { cin>>t;
    for(i=0;i>d[i].c>>d[i].d>>d[i].l;
    }
    void count()
    { for(i=0;i<t;i++)
    { if(d[i].l==4||d[i].l==8)
    cout<<"yes"<<endl;
    else
    cout<<"no"<<endl;
    }
    }
    };

    int main() {
    catanddog q;
    q.get();
    q.count();
    return 0;
    }

    ReplyDelete
  88. Admin bro Or anyone limka book of records please asap

    ReplyDelete
  89. This comment has been removed by the author.

    ReplyDelete
  90. //unary - session 4 operator overloading
    #include
    using namespace std;
    class data
    {
    public:
    int a;
    void setdata()
    {

    }
    void operator -( )
    {
    int count=0;
    for(int i=1;i<=4;i++)
    { cin>>a;
    if(a>0)
    {
    cout<<-a;
    count++;
    if(count%2!=0)
    cout<<" ";
    else if(count%2==0)
    cout<<"\n";
    }
    else
    {
    cout<<-a;
    count++;
    if(count%2!=0)
    cout<<" ";
    else if(count%2==0)
    cout<<"\n";
    }
    }
    }
    };
    int main()
    {
    data obj;
    obj.setdata();
    obj.operator-();
    return 0;
    }

    ReplyDelete
  91. Replies
    1. //BANK Program!

      #include //iostream (include headerfiles)
      #include //math.h
      using namespace std;

      class Customer {

      public:
      char s[100];
      public:
      void display()
      {
      cin>>s;
      }
      };

      class Bank{
      public:
      long num1, num2, num3;
      void display()
      {
      cin>>num1>>num2>>num3;
      }
      };

      class Account:public Customer,public Bank
      {
      public:
      char s[100];
      long num1,num2,num3;
      void display()
      {
      cin>>s;
      cin>>num1>>num2>>num3;
      cout<<"Customer Name="<<s<<endl;
      cout<<"Customer Id="<<num1<<endl;
      cout<<"Account No="<<num2<<endl;
      cout<<"Account Balance="<<num3<<endl;
      //Interest Calc

      double y = num3;
      y = floor((y * 100) + 0.5)/100;
      y = y*12*3;
      int interest = (int)y;
      printf("Interest=%d", interest/100);
      }
      };

      int main() {


      Account user;
      user.display();
      }

      Delete
  92. Bro i want the code for Iomda
    Session- Classes functions and constructors

    ReplyDelete
  93. SESSION: Exceptional Handling
    Q. 73: Number Exception
    QUESTION DESCRIPTION

    Maths teacher is given the task to student that, Write a program to input a number num and run a loop from 0 to num.

    The program should throw an exception whenever the loop counter variable is a multiple of 4, and display the number of exceptions at the end.

    If it is not an integer then give "Invalid input".

    Input:

    Number of iterations

    Output:

    Number of exceptions

    Mandatory:

    Use the keyword try, catch and throw.

    Refer Sample Testcases
    Refer Testcase input and output.

    TEST CASE 1

    INPUT
    12
    OUTPUT
    Number of exceptions: 3
    TEST CASE 2

    INPUT
    123
    OUTPUT
    Number of exceptions: 30

    ReplyDelete
  94. SESSION: IO Streams

    Q. 100: IOST8

    QUESTION DESCRIPTION

    This question will help you to study the concept of "istream_withassign class".

    This class is variant of istream that allows object assignment.

    The predefined object cin is an object of this class and thus may be reassigned at run time to a different istream object.

    User need to write a program, to get two integers from user and print the same as output.

    They have to use istream concepts to read the class with friend function.

    Mandatory declarations of this program is "friend void operator>>", "operator >>"

    Refer Sample Testcases
    TEST CASE 1

    INPUT
    4 5
    OUTPUT
    dx=4 dy=5
    TEST CASE 2

    INPUT
    41 51
    OUTPUT
    dx=41 dy=51

    ReplyDelete
  95. unary: operator overloading:
    #include
    using namespace std;
    class data
    {
    public:
    void setdata()
    {
    int a,b,c,d;
    cin>>a>>b>>c>>d;
    cout<<0-a<<" "<<0-b<<"\n"<<0-c<<" "<<0-d;
    }
    }obj;
    int main()
    {
    obj.setdata();
    }

    ReplyDelete
  96. inheritance: friends in math tution: (100% include)


    #include
    using namespace std;
    class A
    {
    public:
    int n;
    void display()
    {
    cin>>n;
    }
    };
    class B
    {public:
    int p;
    void display()
    {
    cin>>p;
    }
    };
    class C:public A,public B
    {
    public:
    int total;
    void display()
    {
    total=n*p;
    cout<<total<<endl;
    }
    };
    int main()
    {
    C sample;
    sample.A::display();
    sample.B::display();
    sample.display();
    return 0;
    }

    ReplyDelete
  97. inheritance bank (100%) (include iostream)


    #include
    using namespace std;
    class Bank
    {
    };
    class Customer
    {
    };
    class Account:public Customer,public Bank
    {
    };
    int main()
    {
    int Interestrate=12,year=3;
    int a,b,c,i;
    char d[15];
    cin>>d>>a>>b>>c;
    i=c*Interestrate*year;
    cout<<"Customer Name="<<d<<"\nCustomer Id="<<a<<"\nAccount No="<<b<<"\nAccount Balance="<<c<<"\nInterest="<<i/100;
    }

    ReplyDelete