Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Within C we access external devices by means of a pointer i.e. address. The address could point to any memory mapped device i.e. Ram, Rom, Duart, Disk drives etc. Therefore there is no difference between accessing area in Ram or a file on a disk. However accessing devices usually require an initialization program, within C this is achieved by the fopen/fclose commands. The syntax of the fopen command is void main() { FILE *name; name = fopen(device or file name , access); if (name == NULL ) { printf("cannot open the file \n\r"); exit(1); } } The device or file name is usually machine dependent i.e. VMS "dsk$usr:[en_staff.entjmc]file.ext" Unix "dsk$usr:en_staff\entjmc\file.ext" Mac "dskname:folder:folder:file"; PC "drive name:\directory\file.ext"; By default the current disk and directory are taken if not specified. The access describes the write/read privilege and type of data stored i.e. text or binary. Text is used to describe sequential data while binary is standard random access data "r" Text file read only "w" Create a new Text file write only "a" Append to end of the text file "rb" Binary file read only "wb" Binary file write only "ab" Append to end of the binary file "r+" Text file read and write "w+" Create a new text file for read and write "a+" Append to end of the text file for read and write "rb+" Binary file read and write "wb+" Create a binary file for read and write "ab+" Append to end of the binary file for read and write
For example to create a write access file called out.txt we use name = fopen("out.txt","w"); i.e file name = out.txt access = create /write text file It is important to close all channels when finished; this is achieved by fclose i.e. fclose(name);
program to enter 5 values in queue and remove value one by one from queue.
Addition of array elements: #define rows 3 #define cols 3 void main() { int i=0,j=0,sum=0; int arr[rows][cols];
The car’s measurements are illustrated, using two arrays. Array 1 = {L, R, L, R, R, L, R, R, L, R, R, L, R, L, L, R, Z}
Problem: (a) A GUI can contain text-fields, buttons, and other labels. A button usually triggers an event on the GUI. Explain the different processes in registering an event
An experiment succeeds twice as often as it fails. Find the chance that in the next six trials there will be at least four successes.
Find out initial basic feasible solution for the given transportation problem using Least Cost Method (LCM).
assignment on topic fifth generations of computers
Question A bank normally updates it's clients accounts at the end of each month.Of the two types of bank accounts:savings and checking, a client must maintain a minimum balance
one of the applications of computers in numerical analysis is computing the area under a curve. one method of calculating the area under acurve is to divide the area int a number o
In this project, you will write a software for the Registrar's office of a university called YouOIT to maintain information about students and courses at the university. The reg
Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd