Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have a function which accepts a pointer to an int. How
can I pass a constant like 5 to it?

Answer Posted / om prakash mishra

u have to take a temporary variable and pass its adress to
the pointer...like that given below:

// assuming all the conditions are given


int temp=5;
function(&temp);

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What happens if a header file is included twice?

990


What is bin sh c?

1002


Give the rules for variable declaration?

1129


Differentiate call by value and call by reference?

923


What is the difference between new and malloc functions?

1064


Define recursion in c.

1213


What is use of #include in c?

1109


What is a null pointer in c?

1143


Can we change the value of constant variable in c?

1012


What is union and structure?

1052


What is the translation phases used in c language?

1074


What is variables in c?

993


How can I sort more data than will fit in memory?

1049


What is structure padding and packing in c?

1013


write a c program to find the largest and 2nd largest numbers from the given n numbers without using arrays

2194