Author

Convert a Binary Number into Decimal in C

Binary numbers are represented in the base of 2. For example 110112, 1002, etc. In this article, we will be converting a binary number into a decimal number which is represented in base 10 using C language. In the conversion, there are mainly three steps to be followed. The first thing is to get the remainder... » read more

Convert a Stream to Array using Java 8

In the code below converts a Stream to an Array with Java 8. The Java 8 Library contains the .toArray() function that makes it easier to convert Datatypes to an array type. Convert a stream to an Array in Java import java.util.Arrays; public class Main { public static void main(String[] args) { String str =... » read more

Find the number of lines in a text file using C

The following code will find the total number of lines in a text file using C. The code uses C programming language’s built-in functions to access, open, read and count the number of lines of the text file. Number of lines in a text file using C #include <stdio.h> int main() { FILE *fptr; int... » read more

Convert Integer Values to Byte, Character, and Float using Java

In Java, just like most programming languages, we can convert one data type into another type using Type Conversion. Mainly, there are two types of conversions, and in this example, we’ll be using both of them. First one is automatic type conversion, which automatically converts compatible data types into another type using Java — for... » read more

Count Inversion in an Array using C++

The inversions of an array show; how many shifts/turns are needed to turn the array into its sorted form. Inversion Count for an array points out how nearest the array is from being sorted. If an array is already in sorted form, then count inversion 0. Count inversion shall be maximum if the sorted array... » read more

Populate DataTable using DataReader in VB.NET

From this post, we will be talking about the way of populating dataTables using the DataReader in VB.NET. In this example, we’ll be using the SQLDataReader which is available in the SQLClient library. What is a DataReader? DataReader is an object that is used to fetch the data from any data source in a high-performance... » read more

Find the Biggest of Three Numbers using C

In this tutorial, we will learn how to find out the largest number out of three numbers using simple if-else conditions in C programming Language. Method 1 #include <stdio.h> #include <stdlib.h> int main() { int number1, number2, number3; printf("Enter the first number : "); scanf("%d", & number1); printf("Enter the second number : "); scanf("%d", &... » read more

Bind chart control in WinForm using VB.NET and LINQ

In this article, we are going to talk about the chart controls in VB.NET and how it can be bound with data using LINQ. As we all know, charts are used to interpret the data in a more understandable way, where everyone can easily grasp the information that we are representing. Bing a chart control... » read more

Introduction to Numeric Functions in C#

From this article, we are going to talk about the different types of numeric/mathematical functions provided by C#. System namespace provides an inbuilt library to called Math, which provides a valuable set of methods for numeric calculations. As these methods are static methods, we don’t need to add any reference to it. These methods are... » read more

Calculate Average of Numbers in Arrays using C++

The sample code below is to demonstrate how to calculate the average of integer numbers in an array using C++. It’s a console application that takes the ‘n’ as an argument, which is the number of element to be stored in an array, then calculates the average of those numbers. How does this program work?... » read more