Java Programming Code Examples
Java > Learning Code Examples
Transfer Account
The C Programming Pointers & 2D Arrays -
As we know that the one "Dimensional Array" name works as a pointer to the base element of the Array. However in the case "2D Arrays" the logic is slightly different. You can consider
C++ Codes Heap's Algorithm Permutation -
The time complexity of this algorithm: 'O(n!)'. This algorithm 'takes the input' of "N" distinct numbers. It fixes an element at the end of the array and permutes the "remaining numbers"
Program Find the Number of Occurrences -
'Binary Search tree' for a given unsorted data array & maintain an additional count variable. If any 'Element is Repeated' then increase the count of that 'Node'. Proceed with the search
Function strncpy Copies First n Characters -
If 'Length of str2' > n then it just copies first n characters of str2 into str1. If Length of str2 < n then it 'copies' all the characters of str2 into str1 & appends several 'terminator' chars('\0')
Code Sum of Prime numbers between 1- n -
C program to find sum of all prime numbers between 1 to n using for loop. Prime numbers are positive integers greater than 1 that has only two divisors 1 and the number itself. For
C Programming Code N-Queen's Problem -
Enter the number of queens(say n) and watch how computer places them in (n x n) matrix such that none can meet another moving along horizontally, vertically or digonally.
C++ Doing Several Works with 2 Matrices -
This is a program of matrix capable of doing several works with two matrices. It can add, subtract, multiply of two matrices and if user wants to see the input entered in 2 matrices
C++ Coding Find Factorial using recursion -
User enters a number which stores in variable "num". Then number "passes as argument" in function call A static variable is used to check that how many times function is called. When