Virajsinh

B_PRM_07

Oct 9th, 2017
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.31 KB | None | 0 0
  1. /* Write a program for Passing a Structure to a Function */
  2.  
  3. #include<stdio.h>
  4. #include<conio.h>
  5.  
  6. typedef struct
  7. {
  8.     int x,y;
  9. }point;
  10.  
  11. void display(point);
  12.  
  13. void main()
  14. {
  15.     point pl={2,3};
  16.     clrscr();
  17.     display(pl);
  18.     getch();
  19. }
  20.  
  21. void display(point p)
  22. {
  23.     printf("Value x : %d\nValue y : %d",p.x,p.y);
  24. }
Add Comment
Please, Sign In to add comment