Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» templet program
Free forum : Coding Discussions - Portal EmptySun May 14, 2017 11:57 am by akarshsomani

» IP6: Write a C++ program that uses the concept of hybrid inheritance.
Free forum : Coding Discussions - Portal EmptySun May 14, 2017 10:55 am by iamdsc_0410

» Overloading new and delete operator program
Free forum : Coding Discussions - Portal EmptySat May 13, 2017 7:29 am by akarshsomani

» Constructos and Destructors assignment question:CD-3
Free forum : Coding Discussions - Portal EmptyThu May 11, 2017 1:57 pm by Prateek Gupta

» Program related to Object Slicing : Why the output is not coming In Base a=2 ?
Free forum : Coding Discussions - Portal EmptyFri May 05, 2017 7:36 am by akarshsomani

» Program given by sir i.e given in Reema Thareja on Overloading of new and delete operators is not working . Debug it !!
Free forum : Coding Discussions - Portal EmptyMon May 01, 2017 9:11 am by iamdsc_0410

» constructor and destructor assignment solutions
Free forum : Coding Discussions - Portal EmptyMon Apr 24, 2017 8:10 am by akarshsomani

» class and objects assignment solutions.
Free forum : Coding Discussions - Portal EmptyFri Apr 21, 2017 9:01 pm by iamdsc_0410

» SMARKET SOLUTION
Free forum : Coding Discussions - Portal EmptyTue Apr 18, 2017 6:33 pm by iamdsc_0410

Keywords

Who is online?
In total there is 1 user online :: 0 Registered, 0 Hidden and 1 Guest

None

[ View the whole list ]


Most users ever online was 7 on Tue Jun 02, 2020 6:34 am
RSS feeds


Yahoo! 
MSN 
AOL 
Netvibes 
Bloglines 


templet program

Sun May 14, 2017 11:57 am by akarshsomani

please debug
Code:
#include<iostream>
using namespace std;
template<class xx>
class a
{
public:
    xx *ar;int l;xx sum;
    a(int r)
    {
        l=r;
        ar=new xx[l];
    }
    void getc()
    {
        for(int i=0;i<l;i++)
        {
            cin>>ar[i];
       …


[ Full reading ]

Comments: 0

IP6: Write a C++ program that uses the concept of hybrid inheritance.

Sun May 14, 2017 10:55 am by iamdsc_0410

Code:
#include<iostream>
using namespace std;
class Student
{
protected:
int roll;
public:
void getr()
{
cout<<"Enter the roll no.\n";
cin>>roll;
};
void dispr()
{
cout<<"Roll Number : "<<roll<<endl;
}
};
class Test:public Student
{
protected:
int marks1,marks2;
public:


[ Full reading ]

Comments: 0

Overloading new and delete operator program

Mon May 08, 2017 8:27 pm by Prateek Gupta

Code:
#include <iostream>
#include <stdlib.h>

using namespace std;

class Number
{
private:
    int *arr;
public:

    void *operator new(size_t size)
    {
        void *ptr = ::new int[size];
        return ptr;
    }
    void operator delete(void *ptr)
    {
        ::delete(ptr);
     …


[ Full reading ]

Comments: 1

Constructos and Destructors assignment question:CD-3

Thu May 11, 2017 1:57 pm by Prateek Gupta

Code:
#include <bits/stdc++.h>

using namespace std;

class str
{
    char *s;
    int l;
    public:
    str()
    {
        s="/0";
    }
    str(int len)
    {
        l=len;
        s=new char[l];
    }
~str()
   {
        delete s;
        cout<<"Memory …


[ Full reading ]

Comments: 0

Program related to Object Slicing : Why the output is not coming In Base a=2 ?

Thu May 04, 2017 11:04 pm by iamdsc_0410

Code:
//Object Slicing
#include<iostream>
using namespace std;
class Base
{
protected:
int a;
public:
Base(int x)
{
a=x;
}
void show()
{
cout<<"\nIn Base :a="<<a;
}
};
class Derived : public Base
{
private:
int b;
public:
Derived(int x,int y):Base(x)
{
b=y;
}
void …


[ Full reading ]

Comments: 1

Program given by sir i.e given in Reema Thareja on Overloading of new and delete operators is not working . Debug it !!

Mon May 01, 2017 9:11 am by iamdsc_0410

Code:
#include<iostream>
using namespace std;
class Array
{
private:
int *arr;
public:
void * operator new(size_t size)
{
void *parr=::new int[size];
return parr;
}
void operator delete(void *parr)
{
::delete parr;
}
void get_data();
void show_data();
};
void Array::get_data()
{


[ Full reading ]

Comments: 0

constructor and destructor assignment solutions

Fri Apr 21, 2017 9:03 pm by akarshsomani

please share constructor and destructor assignment solutions along with the question number in the comment section.

Comments: 3

class and objects assignment solutions.

Tue Apr 18, 2017 7:32 pm by akarshsomani

please share class and object assignment solutions along with the question number in the comment section.

Comments: 10

SMARKET SOLUTION

Mon Apr 17, 2017 5:31 pm by akarshsomani

It ran only of 10 points.please share better solutions

Code:
import java.util.Scanner;
 
class smarket {
   public static void  main(String args[])
   {
      Scanner sc=new Scanner(System.in);
      
      int t=sc.nextInt();
      while(t-->0)
      {
         
         int n=sc.nextInt();
         int q=sc.nextInt();
         int a[]=new int[n];


[ Full reading ]

Comments: 1

Social bookmarking

Social bookmarking reddit      

Bookmark and share the address of Coding Discussions on your social bookmarking website

March 2024
MonTueWedThuFriSatSun
    123
45678910
11121314151617
18192021222324
25262728293031

Calendar Calendar

Most active topic starters
akarshsomani
Free forum : Coding Discussions - Portal Vote_lcapFree forum : Coding Discussions - Portal Voting_barFree forum : Coding Discussions - Portal Vote_rcap 
Prateek Gupta
Free forum : Coding Discussions - Portal Vote_lcapFree forum : Coding Discussions - Portal Voting_barFree forum : Coding Discussions - Portal Vote_rcap 
iamdsc_0410
Free forum : Coding Discussions - Portal Vote_lcapFree forum : Coding Discussions - Portal Voting_barFree forum : Coding Discussions - Portal Vote_rcap 
Arjun1810
Free forum : Coding Discussions - Portal Vote_lcapFree forum : Coding Discussions - Portal Voting_barFree forum : Coding Discussions - Portal Vote_rcap 

Statistics
We have 10 registered users
The newest registered user is shivendra

Our users have posted a total of 44 messages in 19 subjects