Question

An expression such as pow(2,3) is called a(n) ____________________. Which header file contains the sqrt function?...

  1. An expression such as pow(2,3) is called a(n) ____________________.
  1. Which header file contains the sqrt function?

  1. Which header file contains the setFill function?
  1. Which header file contains string functions?
  1. What is the syntax of the ignore function?
  1. The get function presented in this chapter only reads values of type ____________________.
  1. Write a statement to format the output of decimal numbers to two decimal places.
  1. To force the output to show the decimal point and trailing zeros of a decimal number, use the ____________________ manipulator.
  2. The header file ____________________ needs to be included to use the setw function
0 0
Add a comment Improve this question Transcribed image text
Answer #1
  1. An expression such as pow(2,3) is called a function call.

Explanation: Function calls are used to invoke the function definition by passing arguments.

Here, 2,3 are arguments to the function pow().

  1. Which header file contains the sqrt function? cmath.h

Explantion: cmath.h is a header containing functions prototypes for mathematical operations.

sqrt() is used to find the square root of a number.

Some other functions are exp(),cos(),sin(), log(),pow()

  1. Which header file contains the setFill function?  iomanip.h

Explantion: iomanip.h is a library for output formatting  .

setFill() is used to fill the output stream with a character.

Some other functions are setw(),setiosflags()

  1. Which header file contains string functions? string.h

Explantion: string.h is a library for string functions .

Some functions in string.h are strcat(),strncat(),strcmp(),strcpy()

  1. What is the syntax of the ignore function? cin.ingnore(streamsize,delimiter)

Explantion: cin.ingnore(streamsize,delimiter)

  1. The get function presented in this chapter only reads values of type character.
  1. Write a statement to format the output of decimal numbers to two decimal places.

std::cout<<std::fixed<<std::setprecision(2);

Explanation:  std::fixed - is used used to apply setprecision() to floating part of the decimal

std::setprecision(2) - is used to set the precision to two decimals.

 
  1. To force the output to show the decimal point and trailing zeros of a decimal number, use the showpoint manipulator.

9.The header file iomanip.h needs to be included to use the setw function

Add a comment
Know the answer?
Add Answer to:
An expression such as pow(2,3) is called a(n) ____________________. Which header file contains the sqrt function?...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • How to turn this file into a main.cpp, a header which contains the function declaration, and...

    How to turn this file into a main.cpp, a header which contains the function declaration, and a implementation fiel containing the function definition ? #include<iostream> #include<string> #include<iomanip> using namespace std; #define NUM 1 #define MULT 4 void getPi(int iter); int main() {    int it;    cout << "Enter the number of iterations needed to find PI: ";    cin >> it;    while (it < 1) {        cout << "Error!!! Iteration input should be positive." << endl;...

  • In C program Consider a file that contains employee records, called "empstat.txt." The data for each...

    In C program Consider a file that contains employee records, called "empstat.txt." The data for each employee consist of the employee’s last name (up to 20 characters), employee id number (up to 11 characters), gross pay for the week (double), taxes deducted (double) for the week, and net pay (double) for the week. Create a struct to hold the employee information. Write a void function called writeEmpFile that prompts the user to enter last name, id number, gross pay and...

  • c++ 1) String format checker A string is referred to as A"B"A" if it contains n...

    c++ 1) String format checker A string is referred to as A"B"A" if it contains n > 0 consecutive As followed by n consecutive Bs followed by n consecutive As. Your task is to accept an arbitrary string of any length 1 <k, and determine if it is of the form A"B"A" If it is, then the output of the program is be "Format is OK". Otherwise the output is "Format not acceptable." For example, The given the Linux prompt>...

  • Problem1: BMPmain.c, BMPfns.c, BMPfns.h, Makefile The file 'BMPmain.c' contains a main() function which is already written...

    Problem1: BMPmain.c, BMPfns.c, BMPfns.h, Makefile The file 'BMPmain.c' contains a main() function which is already written for you and attached with this homework. When appropriate functions are provided, main() will create a .bmp image file. Your job is to write 'BMPfns.c' which contains the functions which main() uses to create .bmp image files. You must also write the header file 'BMPfns.h' to #include in BMPmain.c and which contains prototypes of the functions defined in BMPfns.c . Problem2: BMPcheckerboard.c, BMPfns.c, BMPfns.h,...

  • soccerApp.cpp is used to test your code and contains the main function. No changes to this...

    soccerApp.cpp is used to test your code and contains the main function. No changes to this file are necessary. Inside of the soccerPlayer.cpp file, implement the three member functions that are specified in soccerPlayer.hpp. The member function definition for print is already provided. soccerPlayer.cpp: #include "soccerPlayer.hpp" void TopTwoPlayer::print() const { cout << left << setw(8) << "Name: " << setw(18) << name << setw(10) << "Country:" << setw(18) << country << setw(14) << "appearances:" << right << setw(3) << appearances...

  • Problem: Create a program that contains two functions: main and a void function to read data...

    Problem: Create a program that contains two functions: main and a void function to read data from a file and process it. Your main function should prompt the user to enter the name of the file (Lab7.txt), store this name, and then call the function sending the name of the file to the function. After the function has completed, the main function should output the total number of values in the file, how many of the values were odd, how...

  • Write a program that loads a file called "sample.txt" in read mode, reads its content, and...

    Write a program that loads a file called "sample.txt" in read mode, reads its content, and closes the file. Use exception handling to catch any errors. 2. Compute the letter and punctuation distribution in the file. That is, output the number of a’s, the number of b’s, etc. and the number of commas, dashes, and periods. Ignore case when computing this, so ‘A’ and ‘a’ are the same letter. Use lists. 3.   Compute the number of words in the file....

  • C++ program For research purposes and to better help students, the admissions office of your local...

    C++ program For research purposes and to better help students, the admissions office of your local university wants to know how well female and male students perform in certain courses. You receive a file confidentiality, the letter code f is used for female students and m for male students. Every file in the file is unknown. Write a program that computes and outputs the average GPA for both (ECPartIData.txt) that contains female and male student GPAs for certain courses. Due...

  • Please write a c++ header file, class implementation file and main file that does all of...

    Please write a c++ header file, class implementation file and main file that does all of the following and meets the requirements listed below. Also include a Output of your code as to show that your program works and functions properly. EXERCISING A DOUBLY-LINKED LIST CLASS This project consists of two parts, the second of which appears below. For the first part, write a class that implements an unordered list abstract data type using a doubly-linked list with pointers to...

  • //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which...

    //I NEED THE PROGRAM IN C LANGUAGE!// QUESTION: I need you to write a program which manipulates text from an input file using the string library. Your program will accept command line arguments for the input and output file names as well as a list of blacklisted words. There are two major features in this programming: 1. Given an input file with text and a list of words, find and replace every use of these blacklisted words with the string...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT