The complete example is shown below:
// CPPTST.cpp : Defines the entry point for the
console application.
//
#include
"stdafx.h"
#include
<conio.h>
//MemSeg01: Declare a Global Variable
int
x = 10;
//MemSeg02: Store address of the Global variable
in a Global Pointer
int*
px = &x;
//MemSeg03:
Function definition. Takes a number and prints it
void
PrintNo(int x)
{
int
y;
y
= x;
printf("The given number is %d", x);
}
int
_tmain(int argc, _TCHAR* argv[])

Join the conversation! Your thoughts help the community grow.