Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* Write a program for Passing a Structure to a Function */
- #include<stdio.h>
- #include<conio.h>
- typedef struct
- {
- int x,y;
- }point;
- void display(point);
- void main()
- {
- point pl={2,3};
- clrscr();
- display(pl);
- getch();
- }
- void display(point p)
- {
- printf("Value x : %d\nValue y : %d",p.x,p.y);
- }
Add Comment
Please, Sign In to add comment