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 |
Can we use stl in coding interviews?
Who wrote stl?
Define the terms: field, record, table and database
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 .
Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.
Assume I have a linked list contains all of the alphabets from "A" to "Z?" I want to find the letter "Q" in the list, how does you perform the search to find the "Q?"
Is stl part of c++ standard?
write a c++ to define a class box with length,breadth and height as data member and input value(),printvalue() and volume() as member functions.
write a program that input four digit number and find how many 7 that number contains
how to overload << and >> operator in c++
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
Explain stl.