This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: << b << "\n"; return 0; } Save it, and then compile it. Recall that to save in emacs, use this sequence: Control + X then Control + S and to compile a source file, from the terminal, type: g++ mod_example.cpp -o binary_name Above, you can name binary_name anything you want (EXCEPT, of course, the name of the source file!), but it is suggested that you give it a mnemonic name, such that it is not ambiguous or confusing to yourself or anyone that might be writing a program. In Windows, for instance, binary names end in ".exe" to distinguish that they are executable files. After running your program, answer the following questions: a. What is the output? Give explanations why you received this output. That is, evaluate the expressions mathematically and verify the results. b. We declared the variable a as an int type. Why is that?...
View Full Document
- Spring '09
- #include, Executable, mkdir lab2