Skip to main content

Posts

Showing posts from 2017

Single linklist program in c++(only inserting and display function)

#include<iostream> using namespace std; struct node{ int data; node *next; }; class sll{ private:          node *head,*tail; public:         sll(){         head=0;         tail=0;         }         insert(int mydata){         node *tmp=new node;         tmp->data=mydata;         tmp->next=0;          int select;         cout<<"Select one of this option\n";         cout<<"1.insert element at first position\n";         cout<<"2.insert element at Any position\n";         cout<<"3.insert element at last position\n";         cin>>select;             switch(select){         case 1:if(head==0){                     head=tmp;                     tail=tmp;                 }else{                 tmp->next=head;                 head=tmp;                 }                break;         case 2:int cont;                if(head==0 && tail==0){                  cout<&

Application to Create, Insert, update and Delete operation on the database

Q12.Create an application to Create, Insert, update and Delete operation on the database File consists : 1.activity_main.xml 2.Main_Activity.java 3.kDatabaseAdapter.java 4.Message.java activity_main.xml <? xml version= "1.0" encoding= "utf-8" ?>   < RelativeLayout xmlns: android = "http://schemas.android.com/apk/res/android"     xmlns: app = "http://schemas.android.com/apk/res-auto"   xmlns: tools = "http://schemas.android.com/tools"   android :layout_width= "match_parent"   android :layout_height= "match_parent"   tools :context= "com.haldar.kishan.progm12.MainActivity" >    < EditText   android :id= "@+id/user"   android :layout_width= "wrap_content"   android :layout_height= "wrap_content"   android :layout_alignParentTop= "true"     android :layout_centerHorizontal= "true&quo