JSplash logo ad
Get the latest MIDI files of your favourite artists Make money by joining Affiliate programs Developer zone Get a free Email Chat and make friends online Sign up JSplash and get more benefits JSplash Home Member sites
Developer Zone
C++ Programs
C++ Source codes
Logics
Entertainment
Cartoons
Flash zone
Funs & Jokes
Play KBC(Crorepati)
Gallery
Games
Music
MIDI files
Mp3 search
Free Yamaha styles
Albums
Movie releases
Affiliate programs
Pay per click
Pay per lead
Pay per sale
Referrals
Special offers for members
Free email
Power Search
Chat
Community
Prizes & Offers
Join JSplash

 

1. Write a user defined function to search an element in a sorted array of N elements using binary search. The function should return the position of the element in the array if the search is successful and –1 otherwise. Write a complete program in C++ to define the function and invoke it from main.

2. Write a program that reads name, roll number, mark in 4 subjects and total mark of at least 5 students in a Class. Sort the list in the descending order of marks and display the list.

3. Write a program to merge two sorted arrays A and B of size m, n (list A in ascending order, list B in descending order) into a final sorted array C of size m+n.

4. Given two arrays of integers X and Y of sizes m and n respectively. Write a function named merge () which will produce a third array named Z, such that the following sequence is followed.
(i)All odd numbers of X from left to right are copied into Z from left to right
(ii) All even numbers of X from left to right are copied into Z from right to left
(iii) All odd numbers of Y from left to right are copied into Z from left to right
(iv)All even numbers of Y from left to right are copied into Z from right to left
X, Y, Z are passed as arguments to function merge ( ). Write a complete program in C++ to define the function and invoke it from main.

5. A linear array of size 50 stores information: Name of the country, Country’s Capital, and per capita income of the country. Write a complete program in C++ to do the following –
* To read a country’s name and displays capital and per capita income.
* To read the name of the capital city and displays country’s name and per capita income.
Display an Error message in case of incorrect input.

 

body2
Developer zone Developer zone Developer zone Developer zone