This is the extension of the article of finding the second highest salary. Here we’ll see how to find the N-th highest salary. It is more generic version which is applicable for second highest also. Lets consider this employee table. DBMS Independent Way Here we’ll not use any DBMS specific keywords. This SQL query should … Continue reading “SQL Query to Find the N-th Highest Salary”
Author: Srikanta
C Program to Replace All Occurrences of a Character by Another One in a String
Here we’ll see how to replace all occurrences of a character by another one in a string. Read also: C program to remove all occurrences of a character. This program first takes a string as input, then two characters. First character will be replaced by the second one. The replace_char() function replaces the find character … Continue reading “C Program to Replace All Occurrences of a Character by Another One in a String”
C Program to Remove all Occurences of a Character from a String
Here we’ll see how to remove all occurences of a character from a string. For example, if we remove the character ‘o‘ from the string “The quick brown fox jumps over the lazy dog“, the result will be “The quick brwn fx jumps ver the lazy dg“. All four occurneces of ‘o’ removed from the … Continue reading “C Program to Remove all Occurences of a Character from a String”
Linux Command to Rename a File or Directory
Standard Linux distributions don’t generally come with a rename command. You can install the rename package though. But the standard mv (move) command can be used to rename a file or directory very easily. The mv command will be available in almost all Linux. We generally use the mv command to move a file or … Continue reading “Linux Command to Rename a File or Directory”
C Program to Remove All Occurrences of a Number from an Array
In the previous article we saw how to remove an element of a particular position from an array. Here we’ll see how we can remove all occurrences of a number. For example, if an array has the number 100 three times, all three ocurrences of 100 will be removed. The holes created by the removal … Continue reading “C Program to Remove All Occurrences of a Number from an Array”