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 |
why we are using the fork command?.. how it works?
Define stl.
What is the Difference between CArray and CList?
1 Answers ProdEx Technologies, Siemens,
What is stl stand for?
What Is Operator Overloading in C++?
How do you convert stl to steps?
Find the error in the following program struct point {struct point *next; int data; } x; main() {int...data; } x; main() {int i; for(x=p;x!=0;) x=x->next,x++; freelist(x); } freelist(x) {free(x); return }
how to overload << and >> operator in c++
Who wrote stl?
In what cases using of a 'template' is a better approach then using of a 'base class'?
6 Answers Lucent, Mind Tree, Wipro,
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
write a program to demonstrate,how constructor and deconstructor work under multilevel inheritance