A sample linked list

Here is a sample linked list implementation. We should obviously use the std::list that comes with the STL under the header <list>. But since I was not posting something so its just to break the ice and post something...:)

[CODE]

#include<iostream>
struct Node{
               int data;
               Node* next;
};
void InsertAfter(Node **head, int value){
               if(*head==NULL){
                               Node* temp=NULL;
                               temp = new Node;
                               temp->data = value;
                               temp->next = NULL;
                               *head = temp;
               }else{
                               Node *temp = new Node;
                               temp->data = value;
                               temp->next = (*head)->next;
                               (*head)->next = temp;
               }
}
void DeleteAfter(Node **head){
               if(*head==NULL){
                               return;
               }else{
                               Node *temp = NULL;
                               temp = (*head)->next;
                               (*head)->next = (*head)->next->next;
                               delete temp;
                               temp=NULL;
               }
}
int DeleteAll(Node **head,int value){
               int count=0;
               Node *p = NULL;
               Node *q = (*head);
               if(*head==NULL){
                               count =0;
               }else{
                               while((q)!=NULL){
                                               if((q)->data==value){
                                                               Node *temp = NULL;
                                                               temp = q;
                                                               if ( p!=NULL){
                                                                               p->next = q->next;
                                                               }else{
                                                                               (*head) = q->next;
                                                               }
                                                               q = q->next;
                                                               delete temp;
                                                               temp = NULL;
                                                               ++count;
                                               }else{
                                                               p = q;
                                                               q = q->next;
                                               }
                               }
               }
               return count;
}
void DisplayList(Node *head){
               if(head!=NULL){
                               std::cout << head->data << "\n";
                               while(head->next!=NULL){
                                               std::cout <<
                                               head->data << "\n";
                                               head =
                                               head->next;
                               }
               }
               std::cout << "\n\n";
}
int main(){
               Node *head=NULL;
               InsertAfter(&head,10);
               InsertAfter(&head,10);
               InsertAfter(&head,20);
               InsertAfter(&head,10);
               DisplayList(head);
               DeleteAfter(&head);
               DisplayList(head);
               int a = DeleteAll(&head,10);
               std::cout << "Number Of Nodes deleted
                               having value 10 = " <<
                               a <<"\n\n";
               DisplayList(head);
               return 0;
}

Scored 98% - Sun Certified Programmer for Java 2 Platform 1.4 (CX-310-035)

I scored 98%.

Today is a very special day for me as I could comprehensively complete the Sun Certified Programmer for Java 2 Platform 1.4 (CX-310-035) exam. I could score 98% which is believed as to be a great score.

I got ready for this while I was too busy with a new project in my office. But I was able to some how manage and complete the exam with a great score.

And if you are having any questions or clarifications I may be able to help you. Just put me a mail with an explanation, so that I will help you on clarifying those.

Tools in BASIC

Some years ago I wrote a GUI editor named FreeForm in Liberty BASIC. I did this to show my users that they could build interesting software. FreeForm comes with Liberty BASIC, including source code. The Liberty BASIC editor permits users to add tools to the Run menu, so FreeForm comes as a tool on that menu when Liberty BASIC is installed.

I haven't worked on updating FreeForm in several years, but that hasn't stopped it from growing and becoming better. The Liberty BASIC community took over development and they've produced several versions, and some of these have been included with Liberty BASIC. Right now they're working on a whole new version, which I hope may be included in Liberty BASIC v4.03.

Other really cool tools that LB programmers have created have been code formatters, lint tools, and even whole IDE's. Brent Thorn is working on a complete IDE for Liberty BASIC written in Liberty BASIC called ViviFire, which includes a BASIC scripting language so that users can extend the IDE in itself. Extra cool!

Check out this stream