Introduction to C++ Programming

December 16, 2016 | Author: Muhammad Usman Ghani | Category: N/A
Share Embed Donate


Short Description

Download Introduction to C++ Programming...

Description

Introduction to C++ Programming Engr. Muniba DCSE UET Peshawar

Contents of Week 02 • Data types, Constants • Floating Point Constants, Size, Memory Concepts • Names, Keywords, Identifiers • Declaration and Definition of Variables • A Simple Program: Printing a Line of Text • Another Simple Program: Adding Two Integers

Introduction to C++ Programming • C++ language – Facilitates structured and disciplined approach to computer program design • Following several examples – Illustrate many important features of C++ – Each analyzed one statement at a time • Structured programming • Object-oriented programming

3

A Simple C++ Example // C++ simple example

C++ style comments

#include //for C++ Input and Output int main () { standard output stream object int number3; stream insertion operator std::cout > number3; int number2, sum;

stream extraction operator standard input stream object

std::cout > number2; sum = number2 + number3; std::cout
View more...

Comments

Copyright ©2017 KUPDF Inc.
SUPPORT KUPDF