LESSON-2
LESSON-2
University
C++ ENVIRONMENT
HISTORY & SAMPLE
Computer Fundamentals & Programming
LESSON 2/12
GPYA2024
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
Philippine Christian
University
GPYA2024
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
• These international standards have helped ensure the consistency and portability of
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
• One of its most valuable features is its ability to provide low-level access
to hardware resources. This makes it an ideal language for developing
system-level software, such as device drivers, operating systems, and
embedded systems.
• It’s also a highly popular choice for scientific computing and is used to
build high-performance numerical libraries and simulation tools.
Philippine Christian
University
GPYA2024
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
• C++ is generally faster than Java but it’s less portable compared to Java.
Java also has a larger ecosystem of libraries and frameworks.
• Python is highly portable and can run on any platform that has a python
interpreter.
Philippine In comparison, C++ has to be compiled separately for each
Christian
platform.
University
GPYA2024
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
C++ ENVIRONMENT
THE ECOSYSTEM
Philippine Christian
University
GPYA2024
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
C++ ENVIRONMENT
THE HEADERS & LIBRARIES
#include <iostream>
• Standard Input-Output Stream – declares objects that control reading from and writing
to the standard streams.
#include <stdlib.h>
• The Standard Library Utilities – declares various utility functions for type conversions,
memory allocation, algorithms, and similar use cases. It also has multiple data types and
macros defined in the header.
#include <string>
• String Header File – used to declare strings and other variables.
#include <ctype.h>
• CType Header – declares a set of functions to classify (and transform) individual
characters. For example, isupper() checks whether a character is uppercase or not.
#include <cstring>
• CString Header – part of the standard C++ library collection that provides the commonly
used methods for C-Style string manipulation.
#include <unistd.h> – defines miscellaneous symbolic constants and types, and declares
miscellaneous functions.
#include <iomanip> – The manipulator returns an object that, when inserted into the stream
Philippine
str, behavesChristian
as a
University
GPYA2024
formatted output function
using namespace std; – used to automatically declare standard definitions and objects.
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
SAMPLE EXERCISE
OUTPUT # 1:
OUTPUT # 2:
Philippine Christian
University
GPYA2024
Computer Fundamentals & Programming
C++ ENVIRONMENT
HISTORY & SAMPLE
ACTIVITY
SAMPLE OUTPUT
Philippine Christian
University
GPYA2024