Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Wrich of the following is the correct way to declare and initialize a pointer to a previously declared variable z, of type tloat? A.

image text in transcribed

1. Wrich of the following is the correct way to declare and initialize a pointer to a previously declared variable z, of type tloat? A. tloat? p=5z; B. float sp=z; Which of the following statements is TRUE? C. float p=z; D. float p=z i A. The name of the file in use is inData. 2. The main program does NOT update the data if the function: B. Ifstream data type definition is located in the File, txt. I. Does not return the value. D. User must create the xFile txt before executing the program. ii. Uses the reference paramater passing. III. Uses the value parameter passing. 8. A program is writen to store the data for the total monthly rainfall for each month of the IV. Does net update the parameter. year in each fourteen (14) states of Malaysia. Which of the following is the best declaration to store the data? A. II, II, III B. I, ii, IV A. atruct Rainfall I string statekame; D. II, III, IV 13 3. Given the following C++ program fragment. B. double totaliain[12]; C. struct Rainfall Which of the following answer is the correct function prototype for guess {} ? 9. Assume that atruct bookfrec has been declared: A. bool guesg(1nt); bookRec book1, book2; B. void guess(int); int array1[4], array2[4]: C. voia guess (bool); Which of the following statement is VALID? D. bool main(1nt): A. total = book1 + book 2; tota1 = array 1+ arrayz: 4. Which of the following cannot be used to input values into a 3-element double array B. cin bookl; name salary? cin > arrayzd A. cin s alary [0] salary[1] salary[2]; B. cin salary; C. book - book: C. for [int x0;x book 2 ) cin salary [1]; if {array1> array2\} cin 3 salary[2]; 10. Which of the following is FALSE about files in CH+ ? 5. Which of the statements is TRUE about the declaration of array below: A. Data can be read from one file and transferred to another file. string employeeName[4]-\{"Irtan", "Idrig", "Na1ra", "Sarah"]; B. Numeric data read from a flo can be proceesed to get its average. C. Data read from a file can be displayed on the screen. D. Data saved into a file can only come from another file and not from the user. A. The employeellane variable is an array of 3 strings. B. To locate a string on employeekame variable, write the name of the array followed by its index, which is the index of the row. C. Each string can have a maximum of 10 characters. D. The first string of employeeName array can be accessed with employeeName [1]. 6. What is the purpose of the following program? A. To add all of the array elements. B. To compute the average of the array. C. To compute the average of each column. D. To compute the average of each row

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

The Database Experts Guide To SQL

Authors: Frank Lusardi

1st Edition

0070390029, 978-0070390027

More Books

Students also viewed these Databases questions