Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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



wap in c++ which accept a integer array and its size as argument and replaces element having even..

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

Post New Answer

More STL Interview Questions

what's the difference between abstract class and concreate class? what's the meaning of standard template library(STL)?

6 Answers  


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

1 Answers  


what is electronic software

1 Answers  


Write a program to print the swapping in two no and using three variable.

5 Answers   Broadridge,


Waht is inheritance

6 Answers  


write a program that input four digit number and find how many 7 that number contains

4 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

0 Answers  


what is use of for loop?

9 Answers   Wipro,


what are you now programming Languages C+

1 Answers   HCL,


What is Object Oriental Progam

2 Answers  


i wanted to know about questions about c,c++ , which is required for placements.... im a fresher

0 Answers   NDS,


write a program that will accept a number and print.its equivalent in words the maximum input number is 9999

0 Answers  


Categories