can i know the source code for reversing a linked list with
out using a temporary variable?
Answer Posted / vishnu948923
struct node* reverse(struct node* first)
{
struct node* cur, temp;
cur=NULL;
while(first!=NULL)
{
temp=first;
first=first->link;
temp->link=cur;
cur=temp;
}
return cur;
}
| Is This Answer Correct ? | 5 Yes | 5 No |
Post New Answer View All Answers
Explain what does it mean when a pointer is used in an if statement?
How is a macro different from a function?
1.int a=10; 2.int b=20; 3. //write here 4.b=30; Write code at line 3 so that when the value of b is changed variable a should automatically change with same value as b. 5.
What is extern c used for?
Can you return null in c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is cohesion and coupling in c?
What is the condition that is applied with ?: Operator?
How can you allocate arrays or structures bigger than 64K?
Can I use base-2 constants (something like 0b101010)? Is there a printf format for binary?
What is 2c dna?
find the sum of two matrices and WAP for it.
Can a variable be both constant and volatile?
any function have arguments one or more OR not . it is compulsary a) any function compulsary have one or more arguments b) any function did not have arguments. It is not compulsary c) it is optional it is not compulsary d) none of the above
Write a program that accept anumber in words