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

Explain how can type-insensitive macros be created?

988


What is the return type of sizeof?

1063


Why header files are used?

1118


What is difference between structure and union with example?

1055


Where static variables are stored in c?

1106


How can I sort a linked list?

1045


What is call by reference in functions?

1441


Can a pointer be static?

1071


Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2051


What are pointers in C? Give an example where to illustrate their significance.

1225


List some basic data types in c?

1025


How to declare pointer variables?

1239


What are the benefits of organizational structure?

1020


code for replace tabs with equivalent number of blanks

2156


What is structure in c explain with example?

1159