In this tutorial, we will learn how to find the largest two numbers in a given array using the C programming language. The program will ask the user how many numbers the array will contain and the user will give us the input of each number. Our program will then find out the largest and second-largest numbers in the array.Let's take a look into the C program first. After that we will explain to you how the program works.
Read3 ways in C to print the alternate values of an array. We will learn how to use a for loop, while loop, and do...while loop to write the program in C.
ReadIn this tutorial, we will learn how to find duplicate elements in an array of strings. We will learn this using two different approaches :.
ReadIn this tutorial, we will learn how to use strcoll() method in C to compare two different strings. The program will take two input strings from the user and compare them using strcoll() method. strcoll method has the following properties :.
ReadIn this tutorial, we will learn how to print the count of each word in a string using Java. The user will first enter the string and then we will find the count and print out the result.
ReadIn this tutorial, we will learn how to convert a decimal number to octal in c programming language. The octal number system is a base-8 number system. To represent one number in octal, digits from 0 to 7 is used. If a number is in decimal and if we want to convert it to octal, how to achieve it? Let's take a look at a simple example :Suppose we want to convert the number 100 to octal. We will keep dividing this number by 8 and keep appending the remainder till the number becomes 0 :.
ReadIn this tutorial, we will learn how to count the occurrence of each character in a String. The user will enter one string and we will count the occurrence of each character in that string. We will use one HashMap to store the character and count for that character. The key of that hash map is Character and value is Integer. Let's take a look at the Java program first :.
ReadIn this tutorial, we will learn how to replace all occurrences of a character with a different symbol. First, we will take all the inputs from the user- String, character to replace and the symbol. Our program will replace the character with the symbol in the string.
ReadIn this tutorial, we will learn how to print one right angled triangle using python 3. A triangle is called a right angled triangle if it’s one angle is of 90 degree or right angle.
ReadIn python, we have one method to pause the execution of a program - 'sleep()'. This method is available in 'time' module. In this tutorial, we will learn how to pause a program for a specific time interval using sleep.
Read