how to do in place reversal of a linked list(singly or
doubly)?
Answer Posted / ashish gupta
rev()
{
struct node *a1,*a2,*a3;
if(start->next==NULL) /*Only one element exists*/
return;
a1=start;
a2=a1->next;
a3=a2->next;
a1->next=NULL;
a2->next=a1;
while(a3!=NULL)
{
a1=a2;
a2=a3;
a3=a3->next;
a2->next=a1;
}
start=a2;
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
we need to calculating INCOME TAX for the person. The INCOME TAX is as follows:- First $10000/- of income : 4% tax Next $10000/- of income : 8% tax Next $10000/- of income : 11.5% tax above $10, 00,00/- : 15% tax What is the Solution of this Question ?
given post order,in order construct the corresponding binary tree
Explain what is the purpose of "extern" keyword in a function declaration?
What is output redirection?
What is c system32 taskhostw exe?
a) Identify the following declarations. Ex. int i (integer variable) float a[l0](array of 10 real nos) int (*f())() void *f int (*f()) [] void *f int f[] [] [] char *(*f) () int (*f[]) [] float(*f) [] [] float **f int ******f
I have seen function declarations that look like this
Explain what happens if you free a pointer twice?
What is the usage of the pointer in c?
what is a function method?give example?
What are type modifiers in c?
What is difference between constant pointer and constant variable?
write a program that reads lines(using getline), converts each line to an integer using atoi, and computes the average of all the numbers read. also compute the standard deviation.
Explain logical errors? Compare with syntax errors.