how to check whether a linked list is circular.
Answers were Sorted based on User's Feedback
Answer / karunanidhi
start = pointer;
while(pointer)
{
if(pointer->next == start)
printf("Circular");
pointer = pointer->next;
}
printf("Non-Circular");
| Is This Answer Correct ? | 42 Yes | 50 No |
main() { int i=5,j=10; i=i&=j&&10; printf("%d %d",i,j); }
how to print 1 2 3 4 5 6 7 8 9 10 9 8 7 6 5 4 3 2 1 using any loop(for or while) only once(only 1 loop) and maximum 2 variables using C.
19 Answers Cap Gemini, Infosys,
void main() { int c; c=printf("Hello world"); printf("\n%d",c); }
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
#define max 5 #define int arr1[max] main() { typedef char arr2[max]; arr1 list={0,1,2,3,4}; arr2 name="name"; printf("%d %s",list[0],name); }
#include<stdio.h> main() { const int i=4; float j; j = ++i; printf("%d %f", i,++j); }
main() { int i=_l_abc(10); printf("%d\n",--i); } int _l_abc(int i) { return(i++); }
write a function to give demostrate the functionality of 3d in 1d. function prototye: change(int value,int indexX,int indexY,int indexZ, int [] 1dArray); value=what is the date; indexX=x-asix indexY=y-axis indexZ=z-axis and 1dArray=in which and where the value is stored??
Is the following code legal? struct a { int x; struct a b; }
int a=1; printf("%d %d %d",a++,a++,a); need o/p in 'c' and what explanation too
What is the hidden bug with the following statement? assert(val++ != 0);
main() { struct student { char name[30]; struct date dob; }stud; struct date { int day,month,year; }; scanf("%s%d%d%d", stud.rollno, &student.dob.day, &student.dob.month, &student.dob.year); }