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
What is typedef?
The % symbol has a special use in a printf statement. Explain how would you place this character as part of the output on the screen?
Explain what would happen to x in this expression: x += 15; (assuming the value of x is 5)
Compare array data type to pointer data type
What is pointer to pointer in c with example?
what will be the output for the following main() { printf("hi" "hello"); }
write a program to print data of 5 five students with structures?
What are c identifiers?
How do you determine a file’s attributes?
What is wrong with this program statement?
What is self-referential structure in c programming?
Can you please explain the difference between syntax vs logical error?
Why is #define used?
What are the differences between new and malloc in C?
How do you use a pointer to a function?