WAP TO CONVERT STRUCTURE TO FUNCTION

 

#include<iostream.h>
#include<conio.h>
#include<stdio.h>
void show( struct simple);
Struct simple
{
    int x;
    int y;
};
void main()
{
     struct simple str;
     clrscr();
     show(str);
     getch();
}
void show( struct simple dis)
{
     dis.x=10;
     dis.y=20;
     cout<<dis.x;
     cout<<dis.y;
}


Comments

Popular Posts