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 is difference between structure and union with example?

1079


how to make a scientific calculater ?

2083


c program for searching a student details among 10 student details

2093


Is c is a low level language?

1153


Write a program to print fibonacci series without using recursion?

1152


i have to apply for the rbi for the post of officers. i need to know abt the entrance questions whether it may be aps or techinical....

1989


What are the rules for identifiers in c?

1079


a formula,a series of steps,or well defined set of rules for solving a problem a) algorithem b) program c) erdiagram d) compiler

1088


What is a static function in c?

1181


What is null pointer in c?

1008


What is %d used for?

1048


What are the different types of endless loops?

1084


Can you please explain the difference between strcpy() and memcpy() function?

1082


Why can’t constant values be used to define an array’s initial size?

1393


How can I do serial ("comm") port I/O?

1191