Thursday, 28 April 2011

Code for Linked Lists

This is a C code for inserting elements in a linked list at its end, deleting elements from the end.

This code is for the Linux environment written in the vi editor.

Program :
#include<stdio.h>
#include<malloc.h>
#include<stdlib.h>
struct node{
int data;
struct node *link;
}*start=NULL,*temp,*ptr;void display(){
ptr=start;
printf("Data in the list:\t");
if(start==NULL)
{
printf("List empty");
while(ptr!=NULL)
{
printf("%d\t",ptr->data);
ptr=ptr->link;
}
}void insert_end(){
temp=malloc(sizeof(struct node));
printf("\nEnter data for node \n");
scanf("%d",&temp->data);
if(start==NULL)
{
temp->link=NULL;
start=temp;
}
else
{
ptr=start;
while(ptr->link!=NULL)
{
ptr=ptr->link;
}
ptr->link=temp;
temp->link=NULL;
}
display();
}
void delete_end(){
if(start==NULL)
{
printf("No more nodes in the list");
return;
}
if(start->link==NULL)
{
free(start);
start=NULL;
return;
}
ptr=start;
while(ptr->link!=NULL)
{
temp=ptr;
ptr=ptr->link;
}
temp->link=NULL;
free(ptr);
display();
}
int main(){
int ch;
while(1)
{
system("clear");
printf("\n------Menu --------\n");
printf("\n1.Insert at the end\n");
printf("\n2.Delete from end\n");
printf("\n3.Exit\n");
printf("\nEnter choice\n");
scanf("%d",&ch);
switch(ch)
{
case 1:
{
insert_end();
break;
}
case 2:
{
delete_end();
break;
}
case 3:
{
exit(0);
}
}
}
return 0;
}

Tuesday, 12 April 2011

Linked Lists:

A linked list is a linear collection of data elements called nodes. The linear order is given by means of pointers. Each node is divided into two parts: the data part and the link part.
The data part contains the data that is to be stored and the link part contains the address of the next node in the list.

A linked list with four nodes.

Nokia facing software problems!!!


A critical issue has been noticed recently with Nokia handsets including its latest N8. The problem leads to text message delivery failure and software slow down. This is not only the case that Nokia is facing with its current market share dropped to 30% its getting difficult for Nokia to survive. I am personally a Nokia lover every cell phone that I have till date is Nokia, now it’s getting me to think over it.


The problem that N8 faces is with the text message delivery. N8 fails to deliver text message. The problem can be solved by flashing or formatting.  I formatted my Nokia N8 twice still after a day or two it gets into the same problem.  According to Nokia Care the problem is with the software. Nokia should get a quick remedy for this.

The problem not only persists for N8 other handsets like N79 N73 E63 are too into it. I would suggest you to quickly upgrade the software. You can do that with Nokia Software Updater online.


Friday, 1 April 2011

Google Makes April FOOL!!!

Google Motion BETA

A new way to communicate

The mouse and keyboard were invented before the Internet even existed. Since then, countless technological advancements have allowed for much more efficient human computer interaction. Why then do we continue to use outdated technology? Introducing Gmail Motion -- now you can control Gmail with your body. 



Click on Try Gmail Motion


It shows loading... you wait and then...

That's right....APRIL FOOL!!!