CSC209H5 Chapter Notes - Chapter 5: Gnu Compiler Collection, A.Out, Scanf Format String

15 views2 pages

Document Summary

Csc209h5s - software programming and tools (winter 2018) Input streams - provides data to the program. Output streams - destination for program data output. Standard output - used for normal output stdin stdout. Standard error - used for error output stderr. It is possible to change the location of the input/output/error. Streams can also refer to networks, devices and files (for both input and output). printf writes to a stream called standard output scanf reads from a stream called standard input fprintf writes to a specified standard output. You can change the location by using input redirection. #include int main( void ) { int number; scanf( "%d" , &number); printf( "the number is %d\n" , number); return 0 ; It is possible to just run the program and manually input from keyboard. The number is 15 or you can redirect the input from a file (ie. txt) - input redirection.

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

Related Documents