Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.
Diff betweeen static and local
#include
using namespace std;
class ll
{public:
struct node{
int data;
node *link;
}*p;
ll()
{
p=NULL;}
int add(int x)
{
node *q,*r;
if(p==NULL)
{ r=new node;
r->data=x;
r->link=NULL;
q=r;
p=q;
}
else
{
r=new node;
r->data=x;
r->link=NULL;
q->link=r;
q=q->link;
}return 0;
}
void display()
{
node *q;
q=p;
while(q!=NULL)
{
cout<
q=q->link;
}
cout<
};
int main()
{
ll l;
l.add(3);
l.add(5);
l.add(4);
l.add(6);
l.add(7);
l.display();
}
Profile Answers by jayanthnasika Questions by jayanthnasika
Questions by jayanthnasika
This Question is not yet answered!
Related Answered Questions
Related Open Questions