Discussion Notes 1

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

Info icon This preview shows pages 1–11. 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
Image of page 1

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

View Full Document Right Arrow Icon
Location of CAE Lab The CAE lab is located at room 2121A in Bainer Hall. (Upstairs, across from the main MAE office)
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.
Image of page 3

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

View Full Document Right Arrow Icon
_path variable The variable _path in the _chrc/.chrc file is used to set up paths for executable files.
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...
Image of page 5

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

View Full Document Right 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.
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; }
Image of page 7

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

View Full Document Right Arrow Icon
Base binary -> base 2 decimal -> base 10
Image of page 8
Image of page 9

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

View Full Document Right Arrow Icon
Image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern