Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,604 members, 7,809,208 topics. Date: Friday, 26 April 2024 at 05:20 AM

Introduction To C++ Programming - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Introduction To C++ Programming (1947 Views)

Practical Introduction To Python Web Programming / Introduction To C++ Programming (Video Tutorial For Beginners) (2) (3) (4)

(1) (Reply) (Go Down)

Introduction To C++ Programming by Ogundale(m): 5:52am On Sep 18, 2012
This article gives you an introduction to C++ Programming from ground level.
This article won't teach you all the fundas of C++ programming rather it gives
you the base to learn C++ programming, remember that for further learning, the
base should be strong and this is what this article tries to do. It would let
you know many fundas which will help you in further learning of the the language.
C++ was developed in 1980s in the Bell Laboratories by Bjarne Stroustrup as an
object oriented programming language. This language is considered by many as an
extension of the programming language C. The extension of programming language
C to create C++ is obtained by adding classes to C. This is why C++ was initially
called "C with Classes". The C++ programming language derives its
name from the increment operator used in C, which increments the value of a variable.
The symbolic name of C++ rightly indicates that this language is enhanced version
of C.
Features
of C++ Programming Language:-
C++ programming language is highly flexible, versatile and very powerful programming language for developing any software specially the system software namely operating system, compilers etc.
C++ is most ideally suited language for development of reusable programs, which is very important to keep the production cost minimum.
Comparison of C++ Programming Language
Let us see how C++ compares
with other programming languages. All the programming languages can be divided
into two categories:-
Problem oriented languages or High-level languages: These languages have been designed to give a better programming efficiency, i.e. faster program development. Examples of languages falling in this category are FORTRAN, BASIC etc.
Machine oriented languages or Low-level programming languages. These languages have been designed to give a better machine efficiency, i.e. faster program execution. Examples of programming languages falling in this category are Assembly Language and Machine Language.
C++ stands in between these two categories. That's why it is often called
a Middle level language, since it was designed to have both: a relatively good
programming efficiency (as compared to Machine oriented languages) and relatively
good machine efficiency (as compared to Problem oriented languages).
Getting Started with C++ Programming
Communicating with
a computer involves speaking the language the computer understands, which immediately
rules out English as the language of communication with computer. However, there
is a close analogy between learning English language and learning C++ language.
The classical method of learning English is to first learn the alphabets or characters
used in the language, then learn to combine these alphabets to form sentences
and sentences are combined to form paragraphs. Learning C++ programming is similar
and much easier.
Therefore, instead of straight-away learning how to write programs, we must first
know what alphabets, numbers and special symbols are used in C++, then how using
these, constants, variables and keywords are constructed, and finally how are
all these combined to form an instruction. A group of instruction would be combined
later on to form a program. Character SetCharacter set is a set
of valid characters that the language can recognize. A character represents any
letter, digit or any other sign. C++ has the following character set:
Letters A-Z, a-z
Digits 0-9
Special Symbols space + - * / ' " ( )[ ] etc.
White Spaces blank space, horizontal tab, carriage return, newline etc.
Other Characters, C++ can process any of the 256 ASCII characters as data or as
literals.
The alphabets, numbers and special symbols when properly combined form constants,
variables and keywords. Let us see what these are:-
Constants: Constants are data items that never change their value during a program run. C++ programming language allows several kinds of constants.
Variables: Variables are quantities that may vary during program execution. Variable names are names given to locations in the memory of computer where the value is stored.
Keywords: These are the words that convey a special meaning to the language compiler. Keywords are the words whose meaning has already been explained to the C++ compiler. The keywords cannot be used as variable names because if we do so we are trying to assign a new meaning to the keyword, which is not allowed by the computer. Examples of keywords are if, void, for, switch etc.
Data Types in C++
Data types are means to identify the types of
data and the associated operations to handle it. In C++ data types are broadly
of two types:-
Fundamental Data Types: These are predefined to the C++ language itself. there are at least five fundamental data types.
char- represents that the declared variable of this type can store characters
int- represents integers
float- represents floating point numbers
void- represents valueless data
Derived Data Types: These are constructed from the fundamental types. I will not give you the details here because this is a bit high-level.
Instructions in C++ Programming Language
Now that we seen the
different types of constants, variables and keywords the next logical step is
to learn how they are combined to form instructions.
Type declaration instructions: to declare the type of variables used in the program. Eg:- int num; Here a variable num is declared of type int(eger).

2 Likes

Re: Introduction To C++ Programming by mj(m): 2:49pm On Sep 18, 2012
Well done, I'm not a fan of C++ really, maybe later in life if I see the need I might learn it. All the best though.
Re: Introduction To C++ Programming by acmajibo(m): 9:39pm On Sep 18, 2012
thats a good work you have done...can you continue with the next step?
Re: Introduction To C++ Programming by lordZOUGA(m): 10:29pm On Sep 18, 2012
kool... thought I was the only C junkie here
Re: Introduction To C++ Programming by Ogundale(m): 8:48pm On Sep 21, 2012
acmajibo: thats a good work you have done...can you continue with the next step?
yes i would proceed with the next step for sure.
Re: Introduction To C++ Programming by oluminous: 9:30pm On Sep 21, 2012
Ogundale, we are waiting for the continuation pleeeeeeeeeeeeeeeas

(1) (Reply)

Software Developer Needed / Java Mentor / Just Finished A Mini Christmas Android And BB10 App And Game

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 18
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.