APSC 160 Chapter Notes - Chapter 4: Data File, Structure Chart, C Mathematical Functions

67 views5 pages
18 Feb 2017
School
Department
Course

Document Summary

When only the left side of the boolean expression is evaluated. Floating point values ( fabs( num 0. 3 ) < 0. 0001 ) fabs is absolute value in used because computer can"t calculate exact values. Opening the file; special data type called a file pointer: Inputfile = fopen( data. txt , r ); r indicates we want to read the text. Reading the file fscanf( filepointer, formatstring, &var1, , &varn); first parameter; points to the file you want to read from formatstring such as %lf etc. Opening the file for writing outputfile = fopen( results. txt , w ); w for writing verify file opens writing to a file fprintf(filepointer, formatstring, var1); close file. Care about the parameters and return value rather than the external input (keyboard) and. Void specification to be a function that takes a single parameter of type int // Void printrow( int row ) ; // function prototype, declares the symbol printrow.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers