Skip to main content

Hello World in C++!

C++ is one of the most widely used languages  in the world. It is a fast and fluild object oriented successor of the C language which has its ground even after 40 years. Learning C and C++ is one of the major steps in walking through the road of programming. As its a tradition to write the first program in any language as the "HELLO WORLD" program, we'll do exactly that today.

Test Code : ( Use this code to display Hello World! in the console )



#include <iostream>

using namespace std;

int main()
{
    cout << "Hello world!" << endl;
    cout << "I am getting the program to work just fine" << endl;
    return 0;
}



 
NOTE: Don't worry about anything else you see on the screen just focus on the code and rest will be discussed later in the tutorials.
Save the file as "helloworld.cpp", the .cpp extension defines that its a C++ file and you'll be good to go.

Watch the video below for more.


Comments

Popular posts from this blog

How to program pyramids using loops - 2

In this video tutorial, two of the more patterns have been discussed that relates to the similar pattern problems. What's different about these are that they also include spaces before the stars as a part of the pattern to be printed. Having this extra sub pattern to track spaces  in the desired pattern requires an extra loop to track and control it . For a brief review, We discussed that these patterns if observed carefully are just representation of tables i.e. a combination of rows and columns . And few of the cells in that table are populated with some data according to a logically programmed algorithm with represents a pattern. In these cases, the red triangles shows us the spaces represented by "sp" and therefore unlike the previous pattern these need to be managed by the loop as they occur before the stars in the pattern. So, taking the same approach of rows and columns managing loops, we will have an outer loop that tracks the rows which will start at 0

Hello World in C!

C is considered to be the most robust programming language. It is the mother of all modern programming languages. It still has it roots fixed deep even after 45 years of existence. C is one of the fastest programming languages and because of its relationship with the lower level of the computer architecture, it can process data nearly as fast as the hardware components itself. Learning C language is a major step in learning computer programming as a whole. Though C is a relatively small language, its rather important to understand the basic technicalities of the language. In order to dip your toes in the water, let's start with the trivial "HELLO WORLD" program. Test Code : ( Use this code to display Hello World! in the console ) #include<stdio.h> int main(int argc, char const *argv[]) {    printf("%s\n", "Hello, World!");    return 0; } NOTE:  Don't worry about anything else you see on the screen just

Is Food Security Bill really secure?

#FSB  : For the last couple of days there has been a debate on whether the Food Security Bill* is the optimum package provided to the poor and needy ones of india or is this just another gimmick by Congress to win hearts at the time of elections . So i decided to study the bill clearly and I realized that it may have some good points but this is not the last nail in the coffin. Here is what I observed in the Bill to be passed in the Parliament yet : 1) According to the bill the earlier food security plan for the BPL ( below poverty line ) residents of the country which says that 35 kg of grain is to be provided to the poor on t he basis of their ration card per family . The new FSB as presented by Congress says that now they will allocate the supply not per family but 5 kg per head . So that means a family of three getting 35 kg a month will get 15 kg grain . Is this a Food Security Bill or a Food Scarcity Bill ? 2) In every state the current pla n provides sugar , cereals