0

Anyone to help me with this code.

*passing a structure to a function*/ #include <stdio.h> #include<string.h> struct developers{ char name[10]; char skill[20]; int level; }; display(struct developers)//passing the structure.this point is bringing errors int main(){ struct developers A1={"wadika","html",6}; struct developers A2={"joshua","c++",4}; dislay(A1); display(A2); } display(struct developers n){ printf("\n\tName:%s\nskill:%s\nlevel:%d", n.name, n.skill, n.level); }

1st Feb 2020, 8:17 PM
Wadika
Wadika - avatar
2 Antworten
+ 1
typo when calling the display function. display(struct developers); <-semi-colon missing here.
1st Feb 2020, 8:26 PM
rodwynnejones
rodwynnejones - avatar
+ 1
Specify a return type for function to get rid of warnings.. void display(struct developers n) {...} void display(struct developers); //semi colon missed, return type display(A1) ; // typo p missed,
1st Feb 2020, 8:39 PM
Jayakrishna 🇮🇳