Complete the following problem SHORT ANSWER A When an addres

Complete the following problem. SHORT ANSWER.| A) When an address is stored in a memory cell, it is called a(n) [] variable. B) Given the following code, write a C statement to open the file \"customers.txt\" for reading in data. FILE * accounts; C) Given the following code and assuming that the file \"accounts\" has been opened for reading, read one integer from the file. int custId;

Solution

1. A) When an address is stored in a memory cell it is called a pointer variable.

B) File *accounts; // *accounts is the file pointer needed to work with file

accounts = fopen(\"customers.txt\", \"r\");

//fopen() is the function which returns a file pointer . It has two arguements here ,the file name \"customers.txt\" and the mode in which you want to open the file. Here mode is r for reading.

C) int custId;

fscanf () function is used to read the integer custId from the file using file pointer accounts.

 Complete the following problem. SHORT ANSWER.| A) When an address is stored in a memory cell, it is called a(n) [] variable. B) Given the following code, write

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site