answersLogoWhite

0

To insert a value after a node in a linked list, first allocate and initialize the node, then add it to the current node...

newnode* = new node (n);

newnode->next = current.next;

if (current != head) current->next = newnode; else head = newnode;

User Avatar

Wiki User

15y ago

What else can I help you with?

Related Questions

Write a program using recursion which should take two values and display 1st value raised to the power of second value?

Write a program using recursion which should take two values and display 1st value raised to the power of second value.


Write a program using 8086 instructions to double a number?

There isn't a reason to write a complete program to do this; in any assembly language just shift the value 1 bit to the left to double it.


Write a java script program to print first ten odd natural numbers in C?

Q.1 Write a program to print first ten odd natural numbers. Q.2 Write a program to input a number. Print their table. Q.3 Write a function to print a factorial value.


A c program to square matrix?

A C program to square matrix is a math problem. In the math problem you write down all the outer boundary values of matrix in a circle, then write down the inner value.


How do you write a c program which calculates the value of money at the end of each year of investment?

Reference:cprogramming-bd.com/c_page3.aspx#calculates the value of money


How do you write a c program to find square of a no using call by value?

int square (int N) return N*N;


Pointer is a variable holding a memory address?

pointer is a derived datatype which contains memory addresses as their values. program:- #include<stdio.h> #include<conio.h> void main() { int m=5,*p; clrscr(); p=&m; printf("address of variable m is %p",(void *)p); }


Write a complete well-documented C language program The program should repeatedly ask for another input of a non-negative real number ie X until a negative value is inputted and the program then?

Yes, do that, because it is your homework.


What does it mean to write the value for each digit in the number?

it means to write the value. for example.... 1.639. just write the value.


How do you insert a row into a table?

Row can be inserted in to a database using DML (data manipulation language). Example :- insert into table_name [<colum_list>] values (<value 1>, <value 2>, ...);


Why do you have to use the return type for the main function in c language i mean to what does the main function have to return the value to?

It returns the value to the operating system or whatever process launched it. If you launched your program from a batch file then the batch file can detect this return value. If your program is spawned or launched by another program then the return value goes to that parent prgoram or process. One more thing is that you can write main() without the return type and it will be absolutely correct


Can You insert a row containing a null attribute value using SQL?

You cannot do it, if the column is not null in the table. Assuming you have a table TBL with columns a, b, c insert into TBL (a, b, c) values ('AAA', null, 'BBB') Now, the value null would be stored in the database for the column 'b'