struct vg { int cry; int cop; int count; struct vg *next; }; void append(struct vg **q,int cry, int cop) { struct vg *temp,*r; temp = *q; if(*q==NULL) { temp = (struct vg *)malloc(sizeof(struct vg)); temp->cry=cry; temp->cop=cop; temp->count = 0; temp->next=NULL; *q=temp; } else { temp = *q; while(temp->next !=NULL) { temp=temp->next; } r = (struct vg *)malloc(sizeof(struct vg)); r->cry=cry; r->cop = cop; r->count = 0; r->next=NULL; temp->next=r; } } void main() { int cry=0,cop=0; struct vg *p; p=NULL; printf(" Enter the Crystal and coupler number"); scanf("%d %d",&cry, &cop); How the append function should be called.
Reveal answer
Fill a bubble to check yourself
Keep practicing — related questions
- struct vg { int cry; int cop; int count; struct vg *next; }; void append(struct vg **q,int cry, int cop) { ...
- struct aaa{ struct aaa *prev; int i; struct aaa *next; }; main(){ struct aaa abc,def,ghi,jkl; int x=100; ab...
- void main() { struct { int EmpNo; } var; var.EmpNo=193149; printf("EmpNo: %d",var.EmpNo); }
- void main() { struct { int EmpNo; } var; var.EmpNo=193149; printf("EmpNo: %d",var.EmpNo); }
- struct io { int i=0; int j; }; void main() { io op; op.j=20; printf("i = %d",op.i); printf("j= %d",op.j); }
- The following C function takes a single-linked list of integers as a parameter and rearranges the elements ...
- Determine Output : struct node { int a; int b; int c; }; int main() { struct node s= { 3, 5,6 }; struct nod...
- The following C function takes a single-linked list of integers as a parameter and rearranges the elements ...