C++ Answers

Questions answered by Experts: 9 913

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search

given a string "programming" and find the first occurrence of the vowel and move the sequence of consonants preceding the first vowel to the end of the string
Sample input:
Str[]=programming
Sample output:
Updated string=ogrammingpr
write a program to get 5 single digit numbers in an array and form a number using the array elements (use function with array as argument and return the number)
Sample input:
Numbers [5]={1,2,3,4,5}
Sample output:
Number=12345

Show a class Run using static data members that contains the following data members  The name of the runner  The distance covered by a runner The class has the following member functions  Get function to input runner name and distance  Show function to display runner name and distance


Create a class called DISTANCE with data members as feet (int) and inches (float), use parameterised constructor to get the input values of the data members. Write a function to display the output. Create another class called DIST_KM with a data member kilometre (float). Use a parameterized constructor to assign input and a function to display it. In the main function, write a menu-driven program with 1. Convert feet and inches into kilometres 2.Check whether both the distances are equal or not. For option 1, write the conversion function in the source class. For option 2, create a separate object to assign the kilometres and check the equality of distances by overloading the operator (==).  [Note: 1 feet=0.00305km]


You are given a file words.txt containing some words. First, you have to find out the number of
words in the file. Read the words into a 2D array. You are required to make each row a
palindrome by adding additional character(s) if required. Write the updated array in another
file paliandrome.txt

#Write a C++ program that works exactly like strcnmp built-in function. It accepts two strings then it compares the two strings alphabetically considering number of characters to be compared, which is specified by the user. Define your function.



Print hello world


Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another.


Write a C++ program that read student’s subject marks from file named (std_makrs.txt) which contains the marks of 5 students. Each row of the file represents the subject marks of a student. Total subject registered for each student is saved into file named (std_subject.txt)


int i = 1;
double weight;
do
{
cout<< "Enter weight ";
cin>> weight;
cin<<endl;
weight = weight + 1;
i = i +1;
}
while (i<=5)
At which value of i will the loop condition be tested for the second time?
LATEST TUTORIALS
APPROVED BY CLIENTS