Two dimensional array is nothing but set of many one-dimensional array which is represented in usually rows and columns but they are stored in the continuous memory location. The syntax of the 2-D array is int twoD[][] = new int[4][5]; It allocates 4×5 int elements in an array which internally…
Author: codesexplorer
Embedded C to find the number of one's in a given 32bit number and optimize the code
Embedded C to find the number of one’s in a given 32bit number and optimize the code In this article let’s learn how to optimize a program.The program which is used for optimization is to find number of ones in a given 32bit number. First let’s write a simple code…
Java program to find the largest and smallest in an array
Hi, guys:) in this article let’s see how to find the largest and smallest number from an array which is taken as input from the user.T o know more about arrays in java click here. Algorithm: 1)Start 2)Take the input size of an array and elements in an array from…
One dimensional array in java
Arrays Arrays are the collection of homogenous elements. In the sense they have same data type. Arrays can be declared as any dimensions.Each element of an array is accessed by it’s index. One dimensional array It is a single list of same data type.The general form of an array is:…
ARM Assembly code to find number of positive numbers in an array
Let’s see how to write a ARM assembly code to find number of positive numbers in an array. ALGORITHM Start Load the base address of array. Initialize a counter register to number of elements in array. Initialize a register(Rd) to zero to store number of positive numbers. Load the value…
ARM Assembly code to find number of negative numbers in an array
Let’s see how to write a ARM assembly code to find number of negative numbers in an array. ALGORITHM Start Load the base address of array. Initialize a counter register to number of elements in array. Initialize a register(Rd) to zero to store number of negative numbers. Load the value…
Prime Number Program in Java
In this post let’s how to find the given number by the user is prime or not. Usually, the prime number is a number which is divisible by one and by itself. Note: 0 and 1 are not prime numbers. The 2 is the only even prime number because all…
Introduction to Java
Introduction to Java. Beginner to java..?? No problem in this article let’s see how to start programmimg in java.Usually when people hear the word “Java” they think it is very difficult, guys trust me java is easier than C programming. Just that java is object oriented programming language.If you know…
Java program to generate pattern
Java program to generate pattern: Hi guys….! In this article let’s learn how to generate a pattern.Usually a pattern is arrangement of symbols or numbers in a systematic order according to the requirement. In this program let’s see how to generate a pattern. 1 1 2 1 2 3…
ARM assembly code to find number of odd numbers in an array
Let’s see how to write a ARM assembly code to find number of odd numbers in an array. ALGORITHM Start Load the base address of the array. Initialize a counter register to the number of elements in the array. Initialize a register(Rd) to zero to store number of odd numbers.…