I have a function which accepts a pointer to an int. How
can I pass a constant like 5 to it?
Answers were Sorted based on User's Feedback
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 |
Answer / 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 |
How do we select the big element or any other operation from array which is read dynamically. user need to give the elements only no need to mention the size.
What is a node in c?
can we change the default calling convention in c if yes than how.........?
Is void a keyword in c?
What is #include stdio h and #include conio h?
Explain what are the different data types in c?
Is it possible to run using programming C for Java Application?
Can the size of an array be declared at runtime?
Explain Doubly Linked Lists?
Tell about strtok & strstr functions
2 Answers HCL, iFlex, Motorola,
O,T,T,F,F,S,S,E,N,?,?,?,T,F,F,S,S,E,N
what is real time system?what is the differance between hard and soft real time systems