Pages

Saturday, 29 August 2015

C++ Program to insert a new nod and Value in Singly Link List


#include <iostream>
using namespace std;

struct nod
{
int data;
nod *next;
};

class myClass
{
private:

nod *head;
nod *current;
nod *temp;

public:
myClass()
{
head = NULL;
current = NULL;
}


void insert();

};

Monday, 24 August 2015

C++ Program to check whether a number is palindrome or not (through pointers)


#include <iostream>
using namespace std;

class palinDrome
{
private:

char *myInput;
char *inverted;
int size;


public:
palinDrome()
{
myInput = NULL;
inverted = NULL;
size = 0;
}


void input();
void check();
};