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…
Tag: codesexplorer
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…