Questions: 11 448

Answers by our Experts: 10 707

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 & Filtering

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?
Q. Write a class Bank that has the following data members.
Account Holder name (ah_name[])
Account number (ac_number)
Must unique, system generates automatically, and must starting from 100 (Hints: Use another static variable and assign that variable to ac_number)

Balance in the account (ac_balance)



The class has the following member functions.

A constructor to initialize the data members.
Input() to takes name from the user.
Deposit(parameter) to deposits balance in the account.
Must accept parameter (The amount to deposit).
Withdraw(parameter) to withdraws balance after checking.
Must accept parameter (The amount to withdraw).
Display() to show the name, account number, and balance.
Q1. Briefly Explain the following terms:
Classes and objects.
Constructor and its 3 types.
Static Data Members and Static Member Functions.

Study codes given below and add your own codes so that the program is able to:

- count and display the number of vowels exist in the array

- replace all those alphabets after ‘q’ with the symbol ‘*’ 

- display the latest contents of the array


#include<iostream>

using namespace std;


int main()

{

  char myArray[] = {'i', 'n', 't', 'e', 'r', 'n', 'a', 't', 'i','o', 'n', 'a', 'l'};


  //add your codes here

    

  cout<<endl;

  system("pause");

  return 0;

}



1.Write a C++ program that accepts two 4X4 matrices, and calculates:

A.Sum of the matrices

B.Product of the matrices

      Define your functions to do the tasks. 



3.Write a C++ program that accepts sentence from the user, and counts total number of vowel or consonant, and displays the vowel and consonant sentence.

4.Write a C++ program that works exactly like strcat built-in function. It accepts two strings then it concatenates the second string to the first string. Define your function.

5.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.


   Write a code to return the following structure from function:

Structure name is Patientand haveTHE following members.

                  Name, cnic, sugar_level.


LATEST TUTORIALS
APPROVED BY CLIENTS