For Loop in C++

For Loop in C++

In C++ programming yet, We have learned about While loop structure and do while loop structure in previous articles. Today we start for loop structure, This loop structure is little bit different from other loops. For loop consist on three mainly term or things. Which are stated as, Assigning variable is the first term. Secondly we need to set a specific place to keep continue this loop. Third is increment and decrements signs for continuously run this loop until the condition will false. The pattern of for loop structure is mention below.

for (Assigning variable; continuance condition; Increment/ Decrements Condition )
Body of Statement;

As we seen above structure of for loop in C consist of several steps, which we already mentioned above. Let’s take a simple variable having a name (test) in above structure. 

for (test=0; test<=100; test++) {     
cout<<test <<"n"; 

Above we first initialize a variable having a name “test” to 0. Secondly we run a condition at specific target (test<=100), that’s means this loop run continuously at a particular place, when the value of variable “test” is equal or greater than 100. Now in third section we will add increment or decrements signs (test++), This means this loop run continuously till the condition true. We can say that increment or decrements in the variable (test)

How For loop execute or works ?

When the control goes to for statement, It set the variable (test) value 0. Then Execution go to next step which will program check the condition (test<=100) if it is true then body of loop will be executed, And display first execute value “0” on-screen. Next program run the third term increment statement (test++) and this procedure increment in “0” and value will become “1”. Again this execution goes to continuance condition and check the value if it is true then display “1” on-screen. Loop execute repeatedly,Until the value of variable (test<=100) greater than or equal to “100” then this continuance condition will (test<=100) false and control come out of this loop.

Flow Chart of For Loop

 For Loop in C

For Loop Example Program

using namespace std;
	// initialize a few variables for this example program 
	int test,number,maximumNUM;
	//Display input strings 
	cout<<"Please enter the number of table: ";
	cin>> number;
	cout<<"Please enter the maximumNUM: ";
	//For Loop terms 
	for(test=1; test<=maximumNUM; test++)

Output screenshot of above given Program:

 For Loop in C

In above example, We take a simple variables and use them in for loop structure. This program will help you to understand the for loop structure. Don’t forget to commenting on your programs because maybe its helps your team member or other one to understand the code. Always try it yourself. Be creative with your mind and skills. Read these suggested articles: While Loop Structure and Do While Loop Structure.  Don’t forget to share your feedbacks with us. 

How to submit website sitemap to Google Webmaster Tool

How to submit sitemap to Google Webmaster Tool:

How to submit website sitemap to Google Webmaster Tool

When we build a blog or website, We want to list our blogs in Search engines instantly. Newbies are not aware about this step that’s why sometime they don’t get maximum traffic on his blogs, Because your blog appearance not exist in search engines. Google introduce GWT (Google Webmaster Tool) to manipulate your website ranking. Google need a specific list (Sitemap), In Sitemap, Webmaster mentioned his blog or website  URLs, Which help to search engines spiders to find us and start crawl your website.

Google Webmaster Tool is completely free, Webmaster tool contains many of these finest factors, which is important from search engine perspective. As my own experience with webmaster tool, If you don’t attention on it then maybe one day, You will lose your website appearance in search  engines. So, Keep updated yourself. Comeback on topic, First we need to know, What is Sitemap and How we generate sitemap.

What is sitemap?

Sitemap consist on web address (URL) inside your blog or website pages.Sitemap is an XML (Extensible Markup Language) encoding format but readable for bots and human beings. Sitemap factors are following as numbers of URL, indexing frequency etc. Index frequency is a major part of  sitemap but sometimes, webmasters tend to avoid this option. I suggest you edit this option as your routine like: If you update your blog daily then set frequency daily otherwise weekly. Keep remember sitemap.xml file exist in your website root directory same as Robots.txt file. For static websites use online sitemap generator. For WordPress Users use Google sitemap generator. The effective part of this plugin is that, automatically update your sitemap when we publish new post on WordPress. Frequency editable options. Sometimes some bloggers might block google spider until a month, During this month anyone can copy your content and crawl first. which can lead to be a big disaster. Update your sitemap initially before submit to webmaster. Here is  KnowledgeIDea sitemap. Now let’s start submit sitemap to GWT.

Go to >> Google and type >> Google Webmaster tool, Next >> Sign in Google webmaster tool with your simple >> Gmail account.

How to submit website sitemap to Google Webmaster Tool

You can access Google further tools with your simple Gmail account. If you have still not Gmail account then create one. Next procedure after sign in your dashboard.Click on right hand side or left hand side under crawl option(sitemap) to reach sitemap section. Let’s see here.

How to submit website sitemap to Google Webmaster Tool

After reach sitemap page >> Click on >> ADD/TEST SITEMAP Button. Enter your sitemap root path. Before submit sitemap, you should need to test sitemap and find out the errors exist there or not. After clarification you may submit your sitemap. At this page you may see the statistic of your submitted sitemap.

How to submit website sitemap to Google Webmaster Tool

Here is question arising that, How much time it takes to submitted URLs to appear in Google search. There is no particular time. Google catch your sitemap from GWT and start index your web pages. Google spiders indexing web pages in every seconds so, don’t be worry about your website index or not. Hopefully you understand these SEO factors. If you have further query about SEO So, Subscribe our newsletter and keep update yourself.

How to Create Robots.txt File For WordPress

How to Create Robots.txt file in WordPress:

Always we talk about SEO for blogs or websites. Robots.txt file is an important factor of search engine optimization. Because this file block search engine bot to crawl important or specific part of your website. However sometime wrong configured robots.txt file may let your existence completely go away from search engine. As we above say that, it’s an important factor to optimize robots.txt file so, We should keep remember few things. Only block those pages which you want don’t index in search engine. When Google crawler come on web pages ,then it first read robots.txt file instruction. Robots.txt file should be exist on your server root directory.

SEO Consist of hundred of element and robots.txt is one of the necessary part of SEO. Mostly webmaster tend to bypass edit this file. Because most these people’s don’t be aware about this factor editing. I suggest mostly, Be practice yourself always and no need hard knowledge for this file editing. Everyone do that with simple and basic knowledge. Firstly if you are using SEO plugins on your WP blog like Yoast SEO or All in One SEO So, Additionally robots.txt option exist in one of these. But by default you need to create simple notepad and rename with robots.txt then upload it on your root directory via FTP Client. Check my blog robots.txt file screenshot.

Robots.txt wordpress

Above mentioned robots.txt file display which i created for my blog.

For WordPress users robots.txt file by default exist on your root directory. And for other static websites, you need to create simple text document on your desktop rename with robots.txt then upload on root directory via FTP Client or direct File Manager option from Cpanel Both are accessible. You can disallow category or tags pages for duplication activities on search engines. Must remember every bot not honor robots.txt file some nasty bots will even read the robots.txt to find which pages and directories they should mark first for search engine. So,Excellent webmasters always optimize robots.txt file.

How to make robots.txt file:

As I earlier mention, no need a hard skill to build robots.txt file. Just create simple notepad file and rename with robots.txt then upload to website root directory via FTP Client (FileZilla). Next we need to know that, Every robots.txt file contains records every records consist on specific command for search bots.

User-agent: googlebot
Disallow: /cgi-bin/
Disallow: /category/
Disallow: /tags/

User-agent: googlebot  These lines allow to Google bot to index every page of this website instead of cgi-bin folder on root directory and category or tags pages. As we above mentioned, Category or tags pages are may become the cause of duplication on search engine that’s why we suggest to add disallow category or tags pages, Just target your main post pages. Where we add disallow with any folder or page, This means search engine are not able to crawl this specific part of your website.

User-agent: * Here some question arising, On internet not a single search engine because if you want more traffic from multiple search engines so you need to add these lines User-agent: * and allow all search engines to index your  website. 

Somethings are Highlighted:

Somethings are highlighted while creating robots.txt file, don’t add free spaces between them like User-agent:  * User- agent: * Because these terms are prohibited in robots.txt, Beware of these movements. Secondly don’t use comments in robots.txt file. Alphabetical Upper case lower case character case-sensitive that’s why beware during writing folders name and pages name: like if you want index “Images” Directory write “images” instead of capitalized form.

Create WordPress Robots.txt:

After processing all above instructions now you being able to add robots.txt file in root directory via FTP Client. Mostly users use Robots Meta plugin because its easy to use and accessible from WordPress user interface. Here is a useful tip for everyone, you can mention your sitemap URL in your robots.txt file because its easy for Bots to find your sitemap path then bots faster indexing your website pages. You use my blog robots.txt file. Just replace your website name in sitemap URL.

 User-agent: *
 Disallow: /cgi-bin/
 Disallow: /wp-admin/
 Disallow: /wp-includes/
 Disallow: /wp-content/
 Disallow: /downloads/
 Disallow: /lab/
 Disallow: /category/
 Disallow: /tag/
 Disallow: /archives/
 disallow: /*?*
 Disallow: *?replytocom
 Disallow: /wp-*
 Disallow: /author
 Disallow: /comments/feed/
 User-agent: Mediapartners-Google*
 Allow: /
 User-agent: Googlebot-Image
 Allow: /wp-content/uploads/
 User-agent: Adsbot-Google
 Allow: /
 User-agent: Googlebot-Mobile
 Allow: /

How we check robots.txt response:

Here is common question arise, After done everything “How we analysis that our robots.txt file really gonna be work”  And we need to know that, Here is any effect of updated robots.txt file. Let’s check with Google webmaster tool >>Fetch as Google Under Crawl Option

Robots.txt wordpress

Fetch as Google is a finest tool to check out the response of robots.txt file. If your provided URL  success then it can be accessible from bots on the other condition return failure it’s not accessible for bots. Hope this article will help you to make better robots.txt file. For more tips and tricks of SEO subscribe our Newsletter.

How to Make Money from Hostgator Affiliate Program

It is about my past year journey with Hostgator. I had started my affiliate program journey with Hostgator affiliate program on my blog. After more than one year, I realized that, Now its time to share my experience with KnowledgeIDea community. You should need to read Hostgator review. For being a member of Hostgator, I wanna say that, as my personal experience, Still have no quality issue in Hostgator service. Hostgator provide unlimited offers packages with quality customer support. I recommend people for excellent shared hosting, which is affordable for you. My successful referrals makes minimum 70$ for me.

Hostgator Affiliate Program

Hostgator always welcome his affiliates and allow every affiliates to work with consistency. Hostgator bring you fully optimized control panel or Dashboard. Where, you will be able to access your referrals traffic stats commission or many more feature. Right now Sign-up Hostgator Affiliate Program.

[su_button url=”” target=”blank” style=”3d” size=”7″ icon=”icon: hand-o-right”]Join Hostgator Now[/su_button]

Hostgator Affiliate Program:

Hostgator affiliate program is free to join just Sign up Here. Hostgator Affiliate program is open for everyone without any specific requirement to have hosting account with them. I would prefer, before you recommend to anyone its better to use personally first. After sign-up, Hostgator team dispatched account activation link on your provided email. So, you need to conformation and active your account instantly. Snapshot of Hostgator affiliate account dashboard as under.

Hostgator affiliate program

Payment methods:

After sign-up process, go to your account dashboard and update payment method. There are currently two methods exist Check or PayPal, I would prefer choose PayPal because its easy to access.

Hostgator affiliate program

Affiliates traffic report:

Hostgator control panel fully optimized with finest tools. Traffic stats is one of this, you can see the Domain names, which sending affiliates through your website or blog. You can see the top 50 domain names or URL sending traffic there. For complete traffic data, you can download all referrals report from main menu option Get Spreadsheet data.

Hostgator affiliate program

Custom Coupon Codes:

Hostgator Coupon code system is amazing to use it.By the use of this option, you can create distinctive coupon code. This option is really useful for branding such as: I have a website ( So, I can create coupon code by using my domain names. You can create coupon code from discount 9.94$ OFF/Save on complete hosting package. All coupon code must be minimum 10 character in length. Keep remember never use your  coupon code for own sign up. Check the snapshot below.

Hostgator affiliate program

Important Note:

Before using affiliate program must read Term & Policy. Recently some people’s claim about affiliates issues. Keep remember Hostgator will pay only for active accounts not for who those don’t upload blog or website on server or don’t active account through activation email. Don’t use your own custom coupon code to buy domain names because, it is only valid for hosting package not for domain. If you will work as a good member of Hostgator, then they will pay you continuously and work with you for a long time.

How we promote our affiliate link:

Here is some question arising that, How and where, we promote our affiliate link to generate efficient revenue. Because that is not enough to get an affiliate link or banners. I would suggest you promote affiliate links or banners on your blogs post, forums discussion boards and social media sites is effective way to invite someone for discounted packages.

Let us know, about your journey and opinions regard affiliations. If you have any further query, feel free to ask me. 🙂

How to start a blog using WordPress

How to start a blog using WordPress:

WordPress is an open source platform.Which is using to create blog and websites with more efficiency. In other words, we can say WordPress is a publishing platform for bloggers ,writers and others. WordPress is a free platform,there is no cost to pay it. WordPress provides flexible features, which will help you to start your blogging journey with ease. WordPress provides dashboard, which full of tools and gadgets. Here we talking about for beginners. This process consists on several steps:

  1. Need a self hosted domain 
  2. Install WordPress on hosting (Server)
  3. Start Blogging 

Need a self hosted domain:

Let’s start with self hosted domain name.Before going to WordPress, We remember that every website or blog need a particular Domain name (e.g Domain name may be .com (Commercial Purpose) .net or .org Domain name use for network or organization similarly .edu use for education purpose.I prefer you use .com Domain name for business. Let’s start with Buy Domain name and Buy Hosting. Choose HostGator certified hosting as my experience with HostGator and iPage is superb because its reliable and user-friendly Click here for more. I am personally using iPage. iPage Offers cheap hosting on discounted rates click Here for more.

Install WordPress on Host:

After getting the hosting , Go to WordPress site and Download WordPress in zip format. Check the following screenshot.

How to start a blog using WordPress

WordPress Installations process is quite simple and easy. After getting Hosting server,we need to open Cpanel then Goto —> File Manager. Check the below screenshot process. 

How to start a blog using WordPress

Open >> File Manager  then upload the WordPress Download file in the root directory. Keep remember that, Upload file should be in zip format.Then click on upload file. Check the following screenshot of the procedure.

How to start a blog using WordPress

You can upload WordPress package in a specific folder which you want. I am using iPage Cpanel in screenshots. Approximately all Cpanel look like same interface. You will find File Manager option in every Cpanel. Now next step consist on WordPress installation setup. First unzip WordPress Package. Here we mention one more thing, we can upload WordPress Package via FTP Client FileZilla. I personally use FileZilla to upload files on root directory.Check the following screenshot of FileZilla

How to start a blog using WordPress

FileZilla is flexible to upload files on server-side. Drag and drop system and one click to connect to the server, no need to sign in on server every time.We will talk it later on FileZilla. Now comeback on topic, Before goto next step we need a SQL Database to connect with WordPress Package. Comeback on Cpanel and Click on MY SQL Database. Check the following screenshots,which we have taken during create database.

[envira-gallery id=”641″]

After Create Database and user, Open your website in browser. Installation page will appear on the screen. Fill the installation form step by step as given below Screenshots.

[envira-gallery id=”646″]

WordPress Installation now has been completed. Happy blogging. Read How to start a blog with blogger. Hope you like this post, if you have any query so, please share your point of views in below comment. 😉

How to start a blog using Blogger

How to start a blog using Blogger:

Now this era is shifted on internet world, Where community of the people’s sharing more things with each other. But the shape of sharing thing is change from other’s. Some sharing on social media sites such as Facebook, twitter or someone sharing on blogs. Today we will discuss about “how to start a blog”. How a beginner can starts his journey with efficiently without any problems. First you need to think with fresh mind, which things you know better from other’s. Because everyone have a passions, someone experts in writing articles, a house made mother expert in cooking, someone in thinking unique ideas, someone in designing, someone in photography therefore, first we need your motive and aim. Second a subject/skills in which you are expert this is any thing else. Now you need to move your ideas on internet and share with blogs. On internet numbers of platforms are available to start blogging journey for free but you determine better one which one match our requirements. Some famous platforms are mentioned as under:

In this article we talk about how to start a blog with Blogger, for WordPress blogging read this How to start blog using WordPress. what is Blogger ? Blogger is a product of Google Inc. Which is provide blogging platform without any cost. You only need a Gmail Account to create a blogger. If you have Gmail Account then go to then sign in with your Gmail account. Keep remember Google all products include blogger can be access with a free Gmail account so don’t be worried. We divided these blog creation in several steps. Which is as under: 

Step 1:

Login >> Blogger account via Gmail account.

how to start a blog 

Step 2:

Click on >> New Blog Button on << Dashboard

how to start a blog 

Step 3:

After Click on New Blog >> a Pop up will appear on-screen like below screenshot. Now at this stage we choose a specific Site Title and Blog URL (Universal Resource Locator) or Web Address (it should be unique e.g And choose a nice theme which you like.then press >> Create Blog Button.

how to start a blog 

Step 4:

Now you have successfully created your blog. Its time to optimize it with articles/posts.

how to start a blog 

Step 5:

Here is some particular things to understand that, First you need to write Post Title. Then Body area is contains heading, paragraph, and here you need to alert because don’t use copy paste tricks or data because if you use these copy paste terms then Google will penalized your blog lifetime so beware of these movements.Try to write some unique as yourself and remember that, data should be user-friendly.

how to start a blog 

Step 6:

It is an Analytic Panel / Stats Panel in blogger. We may see the traffic stats and check the traffic country visits. We may use the Google analytic tool separately to track the whole blog. Blogger have many and more option to customize your blog efficiently. we may use Blogger Gadgets in Layout under layout section. 

how to start a blog 

Step 7:

Google Keyword tool is most effective part of blogging because we pick rich keywords from that place. We optimize our blog with rich keywords i will describe it explicitly in my coming articles.

how to start a blog 

Step 8:

As we express above Google keyword planner tool is an important factor of blogging to choose a rich/good keywords and put into your content or title.And be honest with your profession. Here is some usage screenshots of Google keyword planner tool. Always place keywords in your content body,headings and post title. Use meaningful data in your articles don’t use spamming words. Once again be honest with your profession.

how to start a blog           how to start a blog 

how to start a blog 

So far, we have read the how to start a blog with blogger and next lesson we will talk about how to start a blog with WordPress with advance enhancement. Blogging is an incredible passion. My experience with blogging is long time since 2010. I will must share WordPress tricks that how to boast your website with WordPress. Hope you understand this article , if you have any problem during reading this article or understanding article so, feel free comment below. 🙂