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 is 2*2?

7 Answers  


write a program to search and display the position of an element in a single-dimentional array using function.

1 Answers  


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

2 Answers  


How is stl different from c++ standard library?

0 Answers  


What are the symptoms of stl?

0 Answers  


i want a road rash 3d game code if some one know please help me

1 Answers  


How Find, Replace and Go To commands ca be used to substitute one character string for another? Explain with the heIp of an example.

1 Answers  


what is the acronym of the term 'C.O.M.P.U.T.E.R' ?

17 Answers   Config Systems, Google, Wipro,


Describe how to safeguard a system through acquisition of an antivirus Program and systematic backup.

0 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  


If P is the population on the first day of the year, B is the birth rate, and D is the death rate, the estimated population at the end of the year is given by the formula: The population growth rate is given by the formula: B – D Write a program that prompts the user to enter the starting population, birth and death rates, and n, the number of years. The program should then calculate and print the estimated population after n years. Your program must have at least the following functions: 1. growthRate: This function takes its parameters the birth and death rates, and it returns the population growth rate. 2. estimatedPopulation: This function takes its parameters the current population, population growth rate, and n, the number of years. It returns the estimated population after n years Your program should not accept a negative birth rate, negative death rate, or a population less than 2. please answer my question ....

0 Answers   Microsoft,


how to making game in c++ ?

0 Answers  


Categories