This is a vary simple program in c++ i shared below. i hope you can easily understand the concept of pointer that what is a pointer? what does pointer ? and how to use pointer ? See the example given below for more detail please ask question in comments.
#include<iostream>// pre-processor directive iostream.h is a header file
using namespace std; // we are using standered keyword and expressions
cout"Facebook : hamidj3\n\n";
// what is point?
// pointer is a spacial kind of variable that is used to store the addresses of memory
// an integer type variable initialized
// a pointer decleared
// &var will show the address of variable and now we are assigning the address to add pointer
cout"Memory address of var :"addendl;
// this is print the memory address of variable
cout"Value that is stored inside the memory address :"*addendl;
// this will printed the stored value inside the memory like var = 10 so 10 will be printed
system("pause");// this is a built-in function that is use to stop the console window for long
If the above code doesn't work then you may also download the attachment file given below
+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)
+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)+ Click Here to Search (Looking For something at vustudents.ning.com?) + Click Here To Join (Our facebook study Group)
what does int*add meanz????????
it means this is a pointer variable that will store the memory address
int * add is a pointer that will be used to store the memory address. memory address is a locations where we store values (information) like
int is a data type mean to say we will store the integer into the x variable and 10 is a value that will be stored inside the x variable this x variable is a name of memory and it has an address we can print the memory address by putting an ampersand (&) before the x that will look like &x. so memory address can be fx00x11. now we need a spacial variable to store this fx00x11 where we can store this as this is a hexadecimal value. for this purpose we will declare a pointer variable.
int staric variablename (int *add) here add= address and you may use any name instead of this add . you may use *y
good work bro....