Given an int variable x write some statements that attempt


1. Given an fstream object named todo , associate it with a file named todolist by opening the file for appending.

2. Given an ofstream object named output , associate it with a file named yearsummary.txt by opening the file for appending.

3. Define an object named outfile that can be used to write data from program variables to a file.

4. Given an int variable x write some statements that attempt to open a file named "table20" and read a value into x ; if that turns out not to be possible your code should then read avalue from standard input into x .

5.Given a bool variable isReadable write some statements that assign true to isReadable if the file "topsecret" exists and can be read by the program and assigns false to isReadable otherwise.

6.Write the necessary preprocessor directive to enable the use of the exit function.

7.Declare a variable cp that can be assigned the address of an char variable. In other words, declare cp to be of type "pointer to char ".

8. Assume the variable diff has already been declared. Write an expression whose value is the address of diff .

9.Assume that an int variable counter has already been declared. Assume further a variable counterPointer of type "pointer to int " has also already been declared. Write a statement that makes counterPointer "point" to counter .

10.Assume that ip has been declared to be a pointer to int and that enrollment has been declared to be an array of 20 elements.

Write a statement that makes ip point to the last element in the array.

 

Request for Solution File

Ask an Expert for Answer!!
Basic Computer Science: Given an int variable x write some statements that attempt
Reference No:- TGS0646164

Expected delivery within 24 Hours