Discussion Notes 1

Discussion Notes 1 - EME 5, Discussion 1 Location of the...

Info iconThis preview shows pages 1–8. Sign up to view the full content.

View Full Document Right Arrow Icon
EME 5, Discussion 1 Location of the CAE Lab _chrc / .chrc file _path variable printf() format placeholders Binary, octal, hexadecimal numbers 2's complement Max and Min values Running C programs in ChSciTE and Ch Shell
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Location of CAE Lab The CAE lab is located at room 2121A in Bainer Hall. (Upstairs, across from the main MAE office)
Background image of page 2
_chrc / .chrc file _chrc/.chrc is the individual startup file in your home directory, and will be invoked each time when Ch is launched.
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
_path variable The variable _path in the _chrc/.chrc file is used to set up paths for executable files.
Background image of page 4
printf() placeholders %d - Integer e.g. 5 %f - Floating Point e.g. 5.5 %c - Character e.g. 'a' %b - Binary %o - Octal %x - Hexadecimal And many more. ..
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Example Write a program that calculates the area of a rectangle. The length and width of the rectangle are specified in the program.
Background image of page 6
Example (cont.) #include <stdio.h> int main() { double h, w, a; h = 2.5; w = 3.6; a = h*w; printf(“The area is %f\n”, a); return 0; }
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 8
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 11

Discussion Notes 1 - EME 5, Discussion 1 Location of the...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online