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 gets() function?

895


What is structure data type in c?

787


What is the explanation for cyclic nature of data types in c?

920


how to print electricity bill according to following charges first 100 units -1rs per unit for next 200 units-1.50 rs per unit without using conditions

2986


hello freinds next week my interview in reliance,nybody has an idea about it intervew questions..so tell

1985


I heard that you have to include stdio.h before calling printf. Why?

847


What is the difference between ‘g’ and “g” in C?

3492


What is the ANSI C Standard?

1037


In c programming write a program that will print 10 multiples of 3 except 15,18,21 using looping

1233


Do you know the use of fflush() function?

849


Is linux written in c?

821


What is meant by preprocessor in c?

778


What is difference between structure and union in c?

784


What is the use of extern in c?

874


What is the use of sizeof?

791