C++

8 Different ways to initialize a vector in C++

Different ways to initialize a vector in C++. We will learn 8 different ways to initialize a vector in C++ with examples for each.

Read
C++

How to add elements to the end of a vector in C++ using push_back

C++ program to add elements to the end of a vector using push_back. Learn how to use push_back in C++ in this example.

Read
c

How to print the longest word of a string in C

C program to print the longest word of a string. This program will take a string as input from the user and print the longest word of the string.

Read
c

C program to print the size of the longest word in a string

How to print the size of the longest word in a string in C programming language. Our program will take one string as input from the user and print the longest word in that string with a C program.

Read
java

How to use pi value in Java with example

Learn to use pi value in Java with example. PI is defined in the Math class or java.lang.Math class in Java. Learn how to import it from this class.

Read
java

How to import math class in Java example

How to import math class in Java. Math class is defined in the java.lang package. This post will show you how to import math class in a Java program and how to use its properties and methods.

Read
java

Java program to check if a number is a tech number or not

Java program to check if a number is a tech number or not. This program will take one number as input from the user and check if it is a tech number or not.

Read
java

Java array copyOfRange method explanation with example

Java array copyOfRange method explanation with example. copyOfRange method is used to copy a specific range of array to a new array in Java. This post will show you how to use copyOfRange with examples.

Read
C++

C++ program to find the average of three numbers

C++ program to find the average of three numbers. We will write different ways to take the numbers as inputs from the user and the program will print the average of these numbers.

Read
c

How to create a hollow diamond star pattern in C

C program to create a hollow diamond star pattern. This program will take the height of the pattern as input from the user and the program will print the hollow diamond star pattern.

Read