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 |
Define stl.
Write a program in C++ returning starting locations of a substring using pointers
What are the symptoms of stl?
Give two integer arrays A & B.A has n elements and B has ' n-1 ' elements . A has all the elements that are there in B. But B has one missing element. Write a function that takes arrays , A & B as imnput and finds the missing element in most optised manner .
Diffrernce Between Overloading and Overriding?
Is stl part of c++ standard?
how can u do connectivity in c++ language? plz send me connectivity code in c++ ?
how to get the sum of two integers?
method overloading means what?
Write a C/C++ program to add a user to MySQL. The user should be permitted to only "INSERT" into the given database.
what is compiler?
Which data structure gives efficient search? A. B-tree B. binary tree C. array D. linked list
21 Answers ABC, Sun Microsystems,