In this tutorial, we will learn how to move all 0 of an integer array to the end of that array in Java. For example, for the array {1,0,2,0,3,0}, it will become {1,2,3,0,0,0}. The algorithm we are going to use is as below :. array
ReadTwo ways in Java to move all the zeros of an integer array to the start of the array. We will learn how to move the zeros by maintaining the order of the numbers and without maintaining the order of the numbers of the array.
ReadIn this tutorial, we will learn how to find the last vowel in a string. For example, for the string, Hello Everyone, the last vowel is e. Our program will print this value. The user will enter one string and the program will check each character one by one. If any vowel found, it will store that character value. Again if another vowel found, it will replace the previous one with the new character. Finally, after the string is completed, print out the character. If no character is found, print one different message. Let's take a look at the C program first :.
ReadIn this tutorial, we will learn how to find the length of a string using C programming language. We will check two different ways to find the length of a string. The string will be provided by the user. Let's take a look at the program :.
ReadIn this tutorial, we will learn how to find the total number of digits in an integer. For example, the number 123 contains 3 digits. We will learn two different ways to solve this problem. First one is by using a while loop and then secondly, by using a recursive method.
ReadIn this tutorial, we will learn what is a nested printf in C program and how to use nested printf in C. Nested printf means one printf another printf.Let's take a look at the example below to understand the program :.
ReadIn this C programming tutorial, we will learn how to find the total sum of all positive numbers and all negative numbers in an integer array. The user will insert the elements into the array. To solve this problem, we will first ask the user to enter the total elements of the array. Then, we will take inputs for each position for that array. After the reading will be completed, we will scan the full array again and calculate the total sum of the positive and negative numbers. Let’s take a look at the program first :.
ReadIn this C programming tutorial, we will learn how to print addition table for a specific number . For that, the user will enter one number and we will read and save that number . After that using one loop, the program will print one addition table.
ReadUsing static import in Java, we can access any public static member of a class directly without using its class name. For example, to find the square root of a number , we have sqrt() method defined in Math class. Since it is a public static class (public static double sqrt(double a)), we can call it directly using the class name like Math.sqrt(4). But , we can also use static import of the class Math and call sqrt method directly like sqrt(4).
ReadIn this tutorial, we will learn how to print the address and elements of an integer array. This example will show you how elements of an array are stored in the memory .
Read