C++

4 ways in C++ to Print all even numbers from 1 to 100

C++ program to print all even numbers from 1 to 100. We will learn four different ways to do that, by using a for loop, while loop, and do...while loop.

Read
C++

How to find compound interest in C++

C++ program to find the compound interest using user given values. The program will take the values as user input and it will print the compound interest.

Read
c

How to find the square root of a number in C

C program to find the square root of a number. This example will use the sqrt method defined in math.h header file.

Read
c#

C# program to get the first N characters of a string

C# program to get the first n characters of a string. We will use String.Substring method in this example program.

Read
c

How to read an octal value using scanf in C

C program to read octal value using scanf. In octal number system, numbers are defined by the digits from 0 to 7. We can use scanf to read an octal value in C.

Read
c

C program to print all printable characters

C program to print all printable characters. A character is called printable character if it occupies a printing position.

Read
c

C program to find the hypotenuse of a right-angled triangle

C program to find the hypotenuse of a right-angled triangle. This program will use the hypot method defined in math.h header file.

Read
c

C getc and putc methods explanation with example

getc and putc methods example in c. getc and putc are used to reading and writing contents from a file. We can use these methods to read and write character from and to a file.

Read
c

How to copy a file in C programming

C programming Example program to copy a file. This program will read the content from one file and write it to another file using C.

Read
javascript

JavaScript program to mask the start digits of a phone number

Learn how to mask the start digits of a phone number in JavaScript. This program will use padStart method for that.

Read