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
We have a GNU system (It is yet another operating system which is completely free and upward-compatible with Unix). For this system we would need a C library to handle system calls and other functionalities. Now, The GNU C Library is used as the C library in the GNU system.
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?
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
Void! At times we will not know how to respond or what to assume or what exactly to do. At such time we express with the expression of ‘Nothing’. When it comes to programming language (here C), we have void. Void can be related to “Nothing” expression of ours. When we don’t have a return… Continue reading Void in C
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
Function yywrap is called by lex when input is exhausted. When the end of the file is reached the return value of yywrap() is checked. If it is non-zero, scanning terminates and if it is 0 scanning continues with next input file. More can be checked in the manual: The Flex Manual Page Advertisements