Unlock access to all the studying documents.
View Full Document
LAB 01
1.1 OBJECTIVES
– To practice cout statement by printing numbers and strings
– To get familiar with basic data types and arithmetic operators in C++
1.2 PRE–LAB READING
1.2.1 VARIABLES AND DATA TYPES
We know that a variable is such an information which keeps on changing all the time. In C++, variables
serve the same purpose. Upon declaration of variable in a program, a sufficient place become reserved
in computer memory. This memory space is labeled with a specific name chosen by the programmer.
The following program is introducing a variable myAge and printing its value on the output screen.
#include <iostream>
int main()
{
int myAge = 18;