Write a program to swap the data members in two objects, using pass by reference for objects.
Write a program which displays a given character, n number of times, using a function. When the n value is not provided, it should print the given character 80 times. When both the
character and n value is not provided, it should print ‘*’ character 80 times.
Write the above program in two ways: -
(i) By using function overloading
(ii) By using default arguments
LA is an array with 10 elements. Your task is to write a C++ program that will perform
sequential search for an element and compute the sum of squares of the location of the
element sought for
1. Write a C++ program for function template to linear and binary search of an array.
Write a simple hello world program
Write a C++ program that creates a one dimensional array of length n. Your program should read five integers into the array from the keyboard and perform a traverse operation of finding the homonic mean of each element in thearray
b) Write a template version of the function count to determine the number of times a specific value occurs in a vector of any base type and test it by declaring two or more vectors with different base types and determining how many times a specific value occurs in these two vectors.