I have a function which accepts a pointer to an int. How
can I pass a constant like 5 to it?
Answer Posted / jaya prakash
Only Using type modifiers only constant 5 is sent to
function.
[In previous 2 answers address of variable temp (5) is only
send to fn , not a constant 5]
for that fn-call is
function((int*)5);
Is This Answer Correct ? | 0 Yes | 2 No |
Post New Answer View All Answers
How can I handle floating-point exceptions gracefully?
Can we access the array using a pointer in c language?
What are header files and what are its uses in C programming?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
What is external variable in c?
Explain function?
What is extern keyword in c?
What is a pointer in c plus plus?
What are the types of data types and explain?
why use functions a) writing functions avoids rewriting the same code over and over b) using functions it becomes easier to write programs and keep track of what they are doing c) a & b d) none of the above
Is c procedural or object oriented?
Should I learn c before c++?
What are local static variables?
What is wrong with this declaration?
What are the Advantages of using macro