wap in c++ which accept a integer array and its size as
argument and replaces element having even values with its
half and element having odd values with twice its value
Answer Posted / ashish
void update(int arr[], int size)
{
for(int i =0;i<size;i++)
{
if(arr[i]%2) arr[i] *= 2;
else arr[i] /= 2;
}
}
| Is This Answer Correct ? | 14 Yes | 11 No |
Post New Answer View All Answers
Name the different types of stl containers.
Can we use stl in coding interviews?
What do stl stand for?
Who created stl?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
What are the components of stl?
Why should a c++ programmer be interested in stl?
How stl is different from the c++ standard library?
What is a stl vector?
How does an stl file work?
Explain stl.
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 total number of disk writes by MySQL.
What is stl in c++ with example?
Do you like to Submit Questions in Bulk under Same Category?? Then use our Bulk ListerDo you like to Submit Questions in Bulk under Same Category?? Then use our Bulk Lister
please visit this site you'll find my question this is my homework please answer it if you can http://easyscience.org/ib/lofiversion/index.php/t36168.html