In mathematics, Greatest Common Divisor (GCD), also known as Highest Common Factor (HCF), of two or more integers is the largest possible integer that divides all the numbers without any reminder. To find out GCD at least one of the integers has to be no-zero. Here we’ll see how to white a recursive function to find … Continue reading “C Program to Find GCD Using Recursion”
Author: Srikanta
Implement Binary Search in C
Binary search is an efficient searching technique that is used to search a key in a sorted array. In every iteration, searching scope is reduced to half. That’s why it is called Binary Search or Half Interval search. Binary Search Algorithm If the middle element of the sub-array is equal to the key, then the … Continue reading “Implement Binary Search in C”
How To Delete all Lines Containing a Particular Text Pattern Using Notepad++?
Press Ctrl+F, Find/Replace dialog will be opened. Select the “Mark” tab. Type the text you want to search in the “Find what: ” filed. For example if you want to delete all lines containing “bible”, type “bible” in this box. Select “Bookmark line” checkbox. Press “Mark All” button. All lines that contain the pattern entered … Continue reading “How To Delete all Lines Containing a Particular Text Pattern Using Notepad++?”
Where to Use Different Types of Loops (for, while, do-while) in C
Loops are very fundamental programming language constructs that allow us to execute a block of code multiple times. In C programming language, there are three types of loops: for, while and do-while. Here we will discuss on the syntax of every loop and where to use them. Though we have three types of loops, any one … Continue reading “Where to Use Different Types of Loops (for, while, do-while) in C”
How to Implement Periodic Timer in Linux Kernel
Linux Kernel already has a timer module that allows us to create timers which are not periodic by default. We can specify a callback function and a timeout value to the module. After expiry of the timeout value, the callback function will be called. Problem is the callback function will be called only once. Here we’ll … Continue reading “How to Implement Periodic Timer in Linux Kernel”