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
To modify an, existing worksheet. What steps are involved for: 1. Inserting and deleting rows and columns. 2. Printing cell formulas 3Jld displayed values 3. Using the page setup command
What is stl in oop?
What are the various types of stl containers?
What is the use of stl?
What is stl stack?
how to use C++?
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
Define stl.
What is meant by stl in c++?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
Describe the My Computer and My Documents folders; identify the elements that are present in every Window.
Is there any error below, its a code to delete all entires from a map #include
Who wrote stl?
draw a flowchart that accepts two numbers and checks if the first is divisible by the second.
i wanted to know about questions about c,c++ , which is required for placements.... im a fresher