Java Programming Code Examples
Java > Learning Code Examples
Simple Arithmetic
C program Copies one String into another -
Demonstrate multiple loop control variables. This is a testing of converge. Copies one string into another. It copies characters to both the ends, converging at the middle...
Program Convert Decimal to Hexadecimal -
In C++ programming, you have to ask to the user to enter the desired decimal number to convert it into hexadecimal number to print the equivalent value in hexadecimal format
C Code Find the GCD & LCM of 2 Integers -
C Program calculates the GCD and LCM of 2 integers. Here gcd means greatest common divisor. For two integers a and b, if there are any numbers d so that a / d and b / d doesn't
Print Natural Numbers in R Reverse n to 1 -
C Program code print all Natural Numbers in reverse from n to 1 using for loop. Input start limit from user. Store it in some variable say start. Run a loop from start to 1 & decrement
C++ Language Hello World Program Code -
Simple C++ program to display "Hello, World" on the screen. Since, it's a simple program, it is often used to illustrate the syntax of a c++ programming language. Every C++ program
C program code to set nth bit of a number -
We use bitwise OR | operator to set any bit of a number. C Bitwise OR operator evaluate each bit of the resultant value to 1 if any of the operand corresponding bit is 1. Input the
Convert Decimal to Octal Number System -
C Program Code input decimal number and convert to octal number system. Decimal number system is a base 10 number system. Decimal number system uses 10 symbols to
Program Count No of Lines & Blank Lines -
Open the file and point it to the file pointer fpoint1. Initialize the variables line_count, n_o_c_l, n_o_n_b_l, n_o_b_l, n_e_c to zero. Using while loop read the next line character