You can have two pointers p,q pointing to the header node...Inside a while loop you move the second pointer by two nodes and first pointer by one node...if loop exists,definitely the two pointers...
Type: Posts; User: rmsece; Keyword(s):
You can have two pointers p,q pointing to the header node...Inside a while loop you move the second pointer by two nodes and first pointer by one node...if loop exists,definitely the two pointers...
Hi,The second way will not work properly when the variables a or b equal to zero,another one problem is that if "a*b" exceeds integer range, it will give unexpected results.
ya,correct,its for integer variables only...But we dont use temporary varibles explicitly...
fine...you can use a single statement to swap two numbers without the use of temporary variable...
a^=b^=a^=b
regards rms...
#include<stdio.h>
#include<conio.h>
void main()
{
int a[15];
int i,j,n;
scanf("%d",&n); /* size of the array */
for(i=0;i<n;i++)
scanf("%d",a[i]);
for(i=0;i<=-1;i++)