## C program to convert a decimal number to octal

Convert a decimal number to octal in C : In this tutorial, we will learn how to convert a decimal number to octal in c programming language. The octal number system is a base-8 number system. To represent one number in octal, digits from 0 to 7 is used. If a number is in decimal […]

## Java program to count the occurrence of each character in a string

Java program to count the occurrence of each character in a string : In this tutorial, we will learn how to count the occurrence of each character in a String. The user will enter one string and we will count the occurrence of each character in that string. We will use one HashMap to store […]

## Python program to replace character in a string with a symbol

Python program to replace all occurence of a character with a symbol in a string : In this tutorial, we will learn how to replace all occurence of a character with a different symbol. First we will take all the inputs from user : String, character to replace and the symbol. To replace , we […]

## Python program to print a right angle triangle

Python 3 program to print a right angle triangle : In this tutorial, we will learn how to print a right angle triangle using python 3. The output will look like as below : 1 2 2 3 3 3 4 4 4 4 5 5 5 5 5 6 6 6 6 6 6 […]

## Python time.sleep method explanation with Example

How to sleep in python using time.sleep() method : In python, we have one method to pause the execution of a program : ‘sleep()’. This method is available in ‘time’ module. In this tutorial, we will learn how to pause a program for a specific time interval using sleep. Syntax of Python time.sleep() : time.sleep(secs) […]

## C program to print all uppercase and lowercase letters in the alphabet

Write a C program to print all Uppercase and Lowercase letters in the alphabet: In this example program, we will learn how to print the uppercase and lowercase letters in C programming language. We will use one for loop to print the characters. Let’s take a look into the program : C program : #include […]

## C program to print a diamond pattern using star or any character

Print Diamond star pattern using C : In this tutorial, we will learn how to print the diamond star pattern using C programming language. User will give the input for number of rows of the star pattern and we will print out the result. For rows count 5, it will print like below : * […]

## C program to copy one string to another

C program to copy one string to another : In this C programming tutorial , we will learn how to copy a string using a built-in library function. The library function we are going to use is char *strcpy(char *dest, const char *src) . We will pass two variables to this function : dest and […]

## C program to find the sum of ‘n’ numbers using dynamic memory allocation

Write a C program to find the sum of ‘n’ numbers using dynamically allocating memory : In this tutorial, we will learn how to find the sum of ‘n’ numbers by allocating memory dynamically. Allocating memory dynamically means we will use only the amount of memory that is required. If user will enter 10 numbers, […]

## C program to print pyramid using star or any other character

C program to print a pyramid using star or any other character : In this tutorial, we will learn how to print a pyramid using star ‘*’ or any other character using ‘C programming language’. The user will input the height of the pyramid and we will print the pyramid equal to that height . […]