INTRODUCTION TO C++ PROGRAMMING YEAR 1
| Institution | UNIVERSITY |
| Course | BACHELOR OF SCIENCE... |
| Year | 1st Year |
| Semester | Unknown |
| Posted By | stephen oyake rabilo |
| File Type | |
| Pages | 33 Pages |
| File Size | 207.62 KB |
| Views | 2079 |
| Downloads | 0 |
| Price: |
Buy Now
|
Description
First Class In C++
Adapted from : http://www.cplusplus.com/doc/tutorial/tut1-1.html
Structure of a C++ program
Probably the best way to start learning a programming language is with a program. So here is our
first program:
// my first program in C++
#include <iostream.h>
int main ()
{
cout << "Hello World!";
return 0;
}
Hello World!
The left side shows the source code for our first program, which we can name, for example,
hiworld.cpp. The right side shows the result of the program once compiled and executed. The way to
edit and compile a program depends on the compiler you are using. Depending on whether it has a
Development Interface or not and on its version. Consult section compilers and the manual or help
included with your compiler if you have doubts on how to compile a C++ console program.
The previous program is the first program that most programming apprentices write, and its result is
the printing on screen of the "Hello World!" sentence. It is one of the simpler programs that can be
written in C++, but it already includes the basic components that every C++ program has. We are
going to take a look at them one by one:
Below is the document preview.
Social Studies grade 4 notes
Trending!
The purpose of this social studies simplified lesson notes is to help the pupil to read easily and understand what is being taught in class
19 Pages
4332 Views
6 Downloads
1.13 MB
Geography F4 Notes
Trending!
The purpose of this simplified Geography simplified notes is to help and equip the student with geographical knowledge to pas the final exams.
200 Pages
3146 Views
0 Downloads
1.23 MB
Agriculture Notes Grade 5
Trending!
The purpose of this agriculture note is to equip the pupil with agricultural knowledge
33 Pages
2941 Views
2 Downloads
4.08 MB
Agriculture grade 5notes
Trending!
The purpose of this agriculture note is to equip the pupil with agricultural knowledge
32 Pages
2790 Views
0 Downloads
4.06 MB
Construction website template
This is a construction website design template to help in creating online building and construction business portal for business
359 Views
0 Downloads
8.55 MB
step by step to file Tax
Trending!
The purpose of this document is to help in filing KRA tax step by step
13 Pages
3216 Views
1 Downloads
938.24 KB
Wedding party invitation template
this is a wedding invitation template to be used to invite people to attend wedding ceremonies
246 Views
1 Downloads
4.45 MB
Wedding card template
This is a flowered wedding card with unique look.
253 Views
0 Downloads
397.06 KB
Wedding card template
This is a wedding invitation card template with quality design.
385 Views
0 Downloads
1.56 MB
Design & Analysis of Algorithm
Trending!
We study data structures so that we can learn to write more efficient programs. But
why must programs be efficient when new computers are faster every year? The
reason is that our ambitions grow with our capabilities. Instead of rendering efficiency needs obsolete, the modern revolution in computing power and storage capability merely raises the efficiency stakes as we computerize more complex tasks.
The quest for program efficiency need not and should not conflict with sound
design and clear coding. Creating efficient programs has little to do with “programming tricks” but rather is based on good organization of information and good algorithms. A programmer who has not mastered the basic principles of clear design
is not likely to write efficient programs. Conversely, “software engineering” cannot
be used as an excuse to justify inefficient performance. Generality in design can
and should be achieved without sacrificing performance, but this can only be done
if the designer understands how to measure performance and does so as an integral
part of the design and implementation process. Most computer science curricula
recognize that good programming skills begin with a strong emphasis on fundamental software engineering principles. Then, once a programmer has learned the
principles of clear program design and implementation, the next step is to study the
effects of data organization and algorithms on program efficiency
638 Pages
3229 Views
0 Downloads
2.03 MB