Posts

Showing posts from August, 2018

Function in C Programming with Examples [Complete Guide]

Image
Function:A function is a block of code that performs a specific task.
Every C program has at least one function, which is main().
A function executes its body (set of instructions) when it is called.
Parts of a function:There are four parts of a function
Return TypeName of the functionParametersFunction Body/DefinitionReturn Type:The type of data function returns after performing its functionality.
Any primitive data type can be used as return type. So return type may be int, float, double, char, long etc.
Name of the Function:Name of the function must show what the function is about. For example, if we want to make a function which simply adds some numbers, then the function name will be sum or summation or add just to show that the function simply adds numbers.
Parameters:Data to receive whenever the function called is known as parameters of the function. Parameters are enclosed in the round brackets with there primitive data types.
Function Body:Function body contains all the code to execu…

Data Structure and Algorithms Tutorial

Image
Data:Raw facts and figures are known as data. We get information from data after processing data.

Data Structure:The data structure is a way of storing and organizing data in a system so that it can be used efficiently.

Types of Data Structure:There are two types of Data Structure
Linear Data Structure
Arrays, Stacks, Queues and Linked List are Linear Data Structures.Non-Linear Data Structure
Trees, Graphs, Tables and all other are Non-Linear Data Structures.
We can also distinguish data structure according to there implementation

There are also two types of Data structure according to there implementation

Physical Data Structure:
Physical data structure means how data actually stored in memory. Arrays and Linked Lists are the examples of Physical data structures because every other data structure like the stack, queue, trees, graphs etc are actually implemented by using arrays or linked lists.Logical Data Structure:
Logical data structure means how data is shown to the user. Stacks, Queues, Tr…

Infix to Prefix conversion Using Stack in C Programming

Infix Expression:When the operators are in-between the operands just like a + b then the expression is known as Infix Expression.
Prefix Expression:When the operators are placed before the operands by some rules just like +ab then the expression is known as Prefix Expression.
Algorithm:1. Create an empty Stack.

2. Reverse the Infix expression.

3. Read all elements from the Infix expression.

3.1 If the element is Left parenthesis then PUSH it into the Stack.

3.2 If the element is Right parenthesis then POP all the elements from the Stack and display with Prefix string until left matching opening parenthesis found.

3.3 If the element is Operand then display with Prefix string.

3.4 If the element is Operator

3.4.1 Check if the Stack is empty, push onto the Stack.

3.4.2 Otherwise, check the priority level from the top of the Stack. If the priority of the operator is greater than the priority level of the operator placed at the top of the stack, PUSH onto stack otherwise POP from Stack and repeat 3.…

Infix to Postfix conversion Using Stack in C Programming

Infix Expression:When the operators are in-between the operands just like a + b then the expression is known as Infix Expression.
Postfix Expression:When the operators are placed after the operands by following some rules just like ab+ then the expression is known as Postfix Expression.
Algorithm:1. Create an empty Stack.
2. Read all elements from the Infix expression.
2.1 If the element is Left parenthesis then PUSH it into the Stack.
2.2 If the element is Right parenthesis then POP all the elements from the Stack and display with Postfix string until left matching opening parenthesis found.
2.3 If the element is Operand then display with Postfix string.
2.4 If the element is Operator
2.4.1 Check if the Stack is empty, PUSH onto the Stack.
2.4.2 Otherwise, check the priority level from the top of the Stack. If the priority of the operator is greater than the priority level of the operator placed at the top of the stack, PUSH onto stack otherwise POP from Stack and repeat 2.4 step again.
3. At …

How to add Social Media Sharing Buttons to Blogger

Image
Adding social media buttons to your blogger to facilitate readers to share your great content easily with there friends is a good idea. It does not only facilitate readers to share your content easily but it also looks very impressive when someone visits your blog and find this great stuff on your blog.

To add social media share buttons on your blogger you have to follow some steps given below.

1. Open your Blogger account.
2. On the left side of Blogger go to Theme and click on Edit HTML button.


3. Copy the code given below
<script type="text/javascript" src="//s7.addthis.com/js/300/addthis_widget.js#pubid=ra-5b6aeae1b3574505"></script>
Paste the copied code right above the </body> tag, will be found at the end of HTML code and click on Save theme button.


Enjoy, your blog now have social sharing buttons. Just like as shown in the screenshot below.



Facing any problem? Please comment.

Also Read: Blogging Tips For Beginners

How to Submit Blogger Sitemap to Google Webmaster

Image
Why submit the sitemap?The sitemap is the collection of all the URLs of your blog post or pages of your site. If our blog/site is new or we have a large blog/site having hundreds of pages then we really need to submit our sitemap to Google Webmaster and other search engines. So that their bots can easily crawl our site/blog pages and index that pages.

To submit the sitemap of blogger to Google Webmaster you have to follow some steps given below

1. Sign in to your Blogger account.
2. On the left side go to Settings >> Search Preferences.
3. Under Crawlers and indexing, click on Edit in front of Google Search Console.


4. Add your website URL and click on Add a property button.

5. On the left side of Google Webmaster go to Crawl >> Sitemaps and click on Add/Test Sitemap.

6. Write sitemap.xml in input and click on Submit.

Now you have submitted your blogger sitemap correctly.
Notes:Make sure you have at least one blog post. Many people write capital "s" of sitemap.xml instead…

Blogging Tips for Beginners || Successful Blogging Tips

Everyone wants to rank his article on the first page of Google, but Google gives benefit in indexing and ranking articles of old blogs having high PA (Page Authority) and DA (Domain Authority).

If you are a new blogger then you are on the right place. You can also rank your blog post with little effort. You just have to increase your PA (Page Authority). 

To achieve the target of ranking your blog you have to follow some things.
Write Regularly:Writing regularly on your blog is very effective in increasing your PA. If you write regularly on your blog, Google and other search engines will index your content fastly which is great. I think if you are a new blogger you have to write 3 to 5 articles per day, your blog will rank easily.
Write Unique:As you know, Google has millions of results against our one keyword, which means millions of people has already written there knowledge or experience, and if we want to write against that keyword on which millions of people have already written then…