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

68 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+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers