- Information
- AI Chat
Was this document helpful?
Activity 5 Programming Microcontroller Input Output Functions 2
Course: General Education (Eng 101)
487 Documents
Students shared 487 documents in this course
University: National University (Philippines)
Was this document helpful?
University of Science and Technology of Southern Philippines
ECE Department
Name: __________________________ Date Performed: ________________
Subject: _________________________ Date Submitted: ________________
Schedule: ________________________ Remarks : _____________________
Programming Microcontroller; C Input/Output Functions
Activity #5 / Simulation #2
By:
Daryl Anne B. Varela., MECE
OBJECTIVES:
To be familiar with the input function ().
To use variables and different data types.
To process input data and display a desired output.
THEORY:
Normally, you are at liberty to give functions whatever names you like, but the main is special
because your program begins executing at the beginning of the main(). This means that every
program must have a main() function.
The first line of the program, #include <stdio.h> tells the compiler to include standard
input/output library information. This includes information about the printf command, which is
a library function that prints output, in this case, the string of characters between the quotes. For
example, in printf (“Hello World!”), Hello World! is a character string or string constant, and is
the argument passed to the printf function. Details of functions will be covered later.
VARIABLES
A variable is a name for a place in the computer's memory where you store some data. We can
assign values to variables through the assignment statement. For example,
a=2;
b = 1.5;
a=100;
Variable Names
1