General Discussions

Algorithm in Layman’s Terms

Layman: What’s an algorithm? He: Do you see that how you always find out a easier way of doing things given to you? Sometimes its the long road and sometimes its the shortcut. You always have a ‘way’ to do things. From basic common sense to expert knowledge! Layman: Yeah!! He: That, for that, we… Continue reading Algorithm in Layman’s Terms

General Discussions

main() – int or void?

Programmers generally use a int main() or a void main() Every function should return a type. Either a success status or a failure status. Even main is a function and should return a type. It is not advisable to use void main(). It should always be int main(). A void main() means it returns no status… Continue reading main() – int or void?

General Discussions

Machine – Input/Output

Every system is made up of atleast the following components: Input States Initial State Transitions Output Machine is also a system. Systems make transition from one state to another based on the input. The result of such transitions is the output. You feed something to machine to get something desired out of it. What you… Continue reading Machine – Input/Output

General Discussions

Counting Word Occurrences From Huge Files

Let us say we were given to count all the occurrences of all the words from a million pages in ONE days time (24 hours). How can we do that? Here is a possible design: Pick up a dictionary which has all the words that ever exists. Get the count of number of words –… Continue reading Counting Word Occurrences From Huge Files

General Discussions

Programming Paradigms

When you ask this question: ‘What were the principles based on which the programming language was developed?’ It kind of points out to the paradigms. Yes, It is essential to know about programming paradigms. They tell us the motivational story behind the language. They tell us how the language has perceived the real world. They tell… Continue reading Programming Paradigms

General Discussions

Learning Structures in C

You get admission to a college after clearing the entrance and you walk with several set of documents. The college admission department maintains several procedures and collects some certificates to return back at the time of graduation. Let us say there are like ten kinds of documents to be maintained for every student. Institute takes… Continue reading Learning Structures in C