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 |
atoi, which takes a string and converts it to an integer. write a program that reads lines(using getline), converts each line to an integer using atoi and computes the average of all the numbers read. also compute the standard deviation
An array name contains base address of the array. Can we change the base address of the array?
what is the first address that gets stored in stack according to a C or C++ compiler???? or what will be the first address that gets stored when we write a C source code????????
Write a C/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 maximum number of concurrent threads that the InnoDB plug-in can create.
What does 3 mean in texting?
What is use of null pointer in c?
can u give me the good and very optimised code for a car racing game?
Write a program that takes a 5 digit number and calculates 2 power that number and prints it
What are the 5 types of organizational structures?
What is pointer to pointer in c language?
What is malloc return c?
What is the deal on sprintf_s return value?