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; printf("%d",scanf("%d",&i)); // value 10 is given as input here }
#include<stdio.h> main() { char s[]={'a','b','c','\n','c','\0'}; char *p,*str,*str1; p=&s[3]; str=p; str1=s; printf("%d",++*p + ++*str1-32); }
Write a single line c expression to delete a,b,c from aabbcc
Finding a number multiplication of 8 with out using arithmetic operator
main() { int i=10,j=20; j = i, j?(i,j)?i:j:j; printf("%d %d",i,j); }
What is "far" and "near" pointers in "c"...?
void main() { int *mptr, *cptr; mptr = (int*)malloc(sizeof(int)); printf(ā%dā,*mptr); int *cptr = (int*)calloc(sizeof(int),1); printf(ā%dā,*cptr); }
main() { char *p="hai friends",*p1; p1=p; while(*p!='\0') ++*p++; printf("%s %s",p,p1); }
program to find the roots of a quadratic equation
14 Answers College School Exams Tests, Engineering, HP, IIIT, Infosys, Rajiv Gandhi University of Knowledge Technologies RGUKT, SSC,
main() { int i=5; printf("%d%d%d%d%d%d",i++,i--,++i,--i,i); }
posted by surbhi just now main() { float a = 5.375; char *p; int i; p=(char*)&a; for(i=0;i<=3;i++) printf("%02x",(unsigned char) p[i]); } how is the output of this program is :: 0000ac40 please let me know y this output has come
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }