program to find middle element of linklist?
Answer / abdur rab
struct node {
int data;
struct node* next;
};
int mid_element ( struct node* _node )
{
struct node* cur_ptr;
struct node* cur_next_ptr;
if ( NULL == _node ) return ( -1 );
else {
cur_ptr = _node;
cur_next_ptr = _node;
while ( ( NULL != cur_ptr -> next )
&& ( NULL != cur_next_ptr -
> next )
&& ( NULL != cur_next_ptr -
> next -> next ) )
{
cur_ptr = cur_ptr -> next;
cur_next_ptr = cur_next_ptr ->
next -> next;
}
}
return ( cur_ptr -> data );
}
| Is This Answer Correct ? | 8 Yes | 2 No |
Explain the ternary tree?
how to execute with out main in cprogram
whats the use of header file in c?
Write a C Program That Will Count The Number Of Even And Odd Integers In A Set using while loop
What is getch c?
Explain what math functions are available for integers? For floating point?
what do you mean by enumeration constant?
#include<stdio.h> #include<conio.h> struct stu { int i; char j; }; union uni { int i; char j; }; void main() { int j,k; clrscr(); struct stu s; j=sizeof(s); printf("%d",j); union uni u; k=sizeof(u); printf("%d",k); getch(); } what is value of j and k.
give one ip, find out which contry
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
what are non standard function in c
Explain what does it mean when a pointer is used in an if statement?