cyberking icon

[C] Pointer show Structure

cyberking | PRO | 03/13/16 06:45:56 AM UTC | 0 ⭐ | 381 👁️ | Never ⏰ | []
C++ |

320 B

|

None

|

0 👍

/

0 👎

#include<iostream.h>
#include<conio.h>
 
struct Node
{
int NilaiUTS;
int NilaiUAS;
int N1, N2;
};
 
Node *P, *Q;
 
main()
{
clrscr();
P = new Node;
P -> N1 = 99;
 
Q = new Node;
Q -> N2 = 78;
 
cout<<endl;
cout<<" nilai P : "<< P -> N1 <<endl;
cout<<" nilai Q : "<< Q -> N2 <<endl;
cout<<endl;
getch();
}

Comments