stack vs heap

Stack [ local variable]

-Variable like int, char, float are store in stack.(Complex structures also array,struct)

-What is – stack is special region in computer memory, its stores temporary variables created by each function, stack is FILO (first in last out)

-Every time a function declare a new variable it pushed into stack, when function exits pushed elements are freed(pop), once stack variables are freed , that region of memory available for other stack variable

-Memory managed (Allocation and free) by CPU efficiently, also read and write stack is very fast

-Keep in mind the stack memory region also limited by varies on OS,

Heap [Global Variable]

-Heap region memory not managed by CPU, it is free floating region of memory (larger), in ‘C language’ use malloc, calloc to allocate memory,realloc to reallocate the memory, once we allocated we need to free up if not used then only other process takes the memory when not in use, if we fail to  do this memory leak problem occur

When to use

-if u need large block of memory, and access variable globally by any function then use Heap




Posted in data structure, Uncategorized | Tagged , , | Leave a comment

Careers for those who love Mathematics

A great article about career guide for those who love mathematics, explains importance of mathematics, employment outlook, mathematics education…

Posted in math, Uncategorized | Tagged , , | Leave a comment

Let’s salute the Nation on Republic Day

Few facts about our Motherland India ,,,,,,,,,

Saffron – Strength and Courage.
The white middle band –  for Peace and Truth.
The Green – for Fertility, Growth and Auspiciousness.
The Sanskrit name for India is – Bharat
India is derived from River Indus (Sindhu) where Aryans Settled.
Aryabhatta invented Zero
Oldest University in the world was Takshila( 700 BC) – 10,500 students from all over world learnt 60 subjects
Nalanda University still exists (4th Century)
Ayurveda is the earliest known school of medicine. Its father Charaka, consolidated Ayurveda 2500 years ago.
Art of Navigation and Navigating was first born in river Sindhu. The word Navigation is derived from Sanskrit word Navagatih.
In 5th Century Bhaskracharya rightly calculated the time taken by the earth to complete orbit – 365.258756484
My India , My Pride – Vande Mataram
Let’s salute the Nation on Republic Day

Src :

Posted in india, Uncategorized | Tagged , , , , | Leave a comment


Display Live cricket score and top cricket news


  • Your office or workstation blocked cricket sites, this app works for you
  • Easy UI & Fast score and news update

Download Desktop app

Review & Feedback




If you face any issues check wiki –

Score & news source by



Posted in Projects, Uncategorized | Tagged , , , | Leave a comment

Direct link to add specific google calendar event?

Direct link to add specific google calendar event text=[Event_Title]& details=[Event_Details]&location=[Event_Location]& dates=[From_Date_Time]/[To_Date_time]

for e.g Event&details=Sample Events Details &location=Location&dates=20151208T180000Z/20151208T191500Z

Dates are given YYYYMMDDTHHMMSSZ format, use GMT time, google automatically convert into your calendar default one



Posted in Uncategorized, web | Tagged , , | Leave a comment

Number. 89

the number 89’s “reverse add” sequence until it reaches palindrome glory.


Posted in Uncategorized | Leave a comment

Watch “Fold and Cut Theorem – Numberphile” on YouTube

Fold and Cut Theorem – Numberphile:

All alphabets created single cut by scissors

Posted in Uncategorized | Leave a comment

Spring inject value into a static field

using org.springframework.beans.factory.config.MethodInvokingFactoryBean to invoke a static setter.

public Class ClassName{
private static Object fieldName;
public static void setFieldName(final Object fieldName)
ClassName.fieldName = fieldName;

Spring Injection:

<bean class="org.springframework.beans.factory.config.MethodInvokingFactoryBean">
<property name="staticMethod" value="package.ClassName.setFieldName" />
<property name="arguments">
<ref bean="refObject" />


Posted in JAVA, spring | Tagged , | Leave a comment

Take a look at “PNR Status”

A very good from railtrip, handful app for train traveller …
Many features include sms synch for ur train trip, history of train info, top news, live train status, pnr status, speedometer..



Posted in Uncategorized | Leave a comment

delete multiple files and files in windows using command prompt in less time

Take too much to delete too many files folder in window explorer.

Using following simple steps to delete files using command prompt with less time

use rmdir to delete the files and subfolder,

rmdir /s/q MyFolderPath
However, it is significantly faster, especially when you have a lot of subfolders in your structure to use del before the rmdir, like this:

del /f/s/q MyFolderPath > nul
rmdir /s/q MyFolderPath

Posted in file, technology, windows | Tagged , | Leave a comment