We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More


Dear Students! Share your Assignments / GDBs / Quizzes files as you receive in your LMS, So it can be discussed/solved timely. Add Discussion

How to Add New Discussion in Study Group ? Step By Step Guide Click Here.

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

main(){
cout"Facebook : hamidj3\n\n";
cout"Email: badshah.hazor@gmail.com\n";
// what is point?
// pointer is a spacial kind of variable that is used to store the addresses of memory
int var=10;
// an integer type variable initialized
int *add;
// a pointer decleared
add= &var;
// &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

cout"\n";
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 

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 314

.

+ 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)

Attachments:

Replies to This Discussion

what does int*add meanz????????

it means this is a pointer variable that will store the memory address 

sorry

explain plzzz

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 x=10;

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....

thanks

RSS

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service

.