Lecture2_handout

Lecture2_handout - Input/Output Functions Next we will...

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

View Full Document Right Arrow Icon
1 E140: Introduction to EE140: Introduction to Programming Concepts for Engineers Lecture 2 1 Programming Basics and Variables Input/Output Functions Next we will focus on two important functions: standard Variables Constants printf() input function and standard output function. We also want to look at the concept of variables and constants. 2 scanf() Variables Variables are used to store data in a program. They must be defined with a name and a data type in the beginning of main nction before they can be used in a program Name Refer to the variable in the program, must be unique Consist of letters a-z, A-Z, digits 0 to 9, and underline _ Digitals 0 to 9 can not be the first character of the name It is case sensitive Use meaningful names, but not too long (such as area, length, idth) function before they can be used in a program. 3 width) Data Type Indicates what kind of information can be stored in the variable See next slide for more details Variable Types
Background image of page 1

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

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

Page1 / 3

Lecture2_handout - Input/Output Functions Next we will...

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

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