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 |
What are structural members?
please help me.. how to write a code of this output?? "Enter range number:"10 1 is an odd number 2 is an even numbers 3 in an odd numbers 4 " to 10" "printing all odd numbers:" 1,3,5,7,9 "printing all even numbers:" 2,4,6,8,10 "sum of all odd numbers:25 "sum of all even numbers:30 using a C Programming ARRAY pleas pleas help.. its my project ..please :(
What is a header file?
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.
what is an inline function?
I have written a pro*C program to fetch data from the cursor. where in i have used the concept of BULK FETCH.... each FETCH statement is taking lots of time to fetch specified number of rows at...
write a program which the o/p should b in such a way that s triangle if I/p is 3,a Square/rectangle if I/P=4,a pentagon if I/P=5 and so on...forget about the I/P which is less than 3
what is the output of the program?? #include<stdio.h> main ( ) { int a=010,sum=0,tracker: for(tracker=0;tracker<=a;tracker++) sum+=tracker; printf(ā %d\nā,sum); } what is the difference between a=10 and a=010??
Take an MxN matrice from user and then sum upper diagonal in a variable and lower diagonal in a separate variables. Print the result
what is Structural oriented language? give some example of this language.....?
i have a written test for microland please give me test pattern
What is difference between scanf and gets?