Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Q. Write down a programme in C to create a single linked list also write the functions to do the following operations
(i) To insert a new node at the end
(ii) To delete the first node
Ans:
//Create a single list
struct node
{
int data;
struct node *link
}
struct node *p,*q;
//Inserting a node at the end(append)
append(struct node **q,int num)
struct node *temp; temp=*q; if(*q==NULL)
*q=malloc(sizeof(struct node *));
temp=*q;
else
while(temp link!=NULL)
temp=temp link;
temp link = malloc(sizeof(struct node *));
Temp data=num;
temp link=NULL;
//Delete the first node delete(struct node *q,int num)
struct node *temp;
*q=temp link;
free(temp);
Ordinary variable An ordinary variable of a easy data type can store a one element only
Define Big Theta notation Big Theta notation (θ) : The upper and lower bound for the function 'f' is given by the big oh notation (θ). Considering 'g' to be a function from t
Suppose there are exactly five packet switches (Figure 4) between a sending host and a receiving host connected by a virtual circuit line (shown as dotted line in figure 4). The tr
Q. What is the smallest value of n such that an algorithm whose running time is 100n2 runs faster than an algorithm whose running time is 2n on the same machine. A n
Containers Introduction Simple abstract data types are useful for manipulating simple sets of values, such as integers or real numbers however more complex abstract data t
Definition of Algorithm Algorithm must have the following five characteristic features: 1. Input 2. Output 3. Definiteness 4. Effectiveness 5
Varieties of Arrays In some languages, size of an array should be established once and for all at program design time and can't change during execution. Such arrays are known a
CIRCULARLY LINKED LISTS IMPLEMENTATION A linked list wherein the last element points to the first element is called as CIRCULAR linked list. The chains do not specified first o
how we will make projects on stack in c?
Comp are two functions n 2 and 2 n / 4 for distinct values of n. Determine When s ec on d function b ec om es l a r g er th an f i r st functi
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +91-977-207-8620
Phone: +91-977-207-8620
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd