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 / 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 |
what is compiler?
In what scenario does the Logical file and Physical file being used?
What is stl stack?
Explain References in C++
HOW TO GET "H1B" -VISA 4 USA FOR MY SON?HE HAD COMPLETED "MS"(IT)FROM AUSTALIA 2007.I AM WORKING IN U.S.A.
I am doing my BS.c MATHS CAN I ABLE TO JOIN IN NIIT?
write a program that input four digit no and finds it is palindrome or not
how to get the sum of two integers?
Write a program in C++ to concatenate two strings into third string using pointers
Describe the elements of Microsoft Word screen. Write down steps for creating, saving, retrieving, editing and printing a document.
what is template and type convertion
Give the output of the following program main() {int ret; ret=fork();ret=fork();ret=fork();ret=fork(); if(!ret) printf("sun"); else printf("solaris");