Ads block

Banner 728x90px

C program to find first & second largest number in array


C program to find first & second largest number in array
/* C program to find first & second largest number in array         Array: 3, 10, 80, 20, 5         Max1: 80         Max2: 20 Logic:         1. Input size…
Read more »

C program to swap two numbers in different ways


C program to swap two numbers in different ways
/* Md. Alamgir Hossain Lecturer, Dept. of CSE, Prime University */ //C program to swap two numbers //Input:    a = 10, b = 25 //Output: b = 25, a = 10 #includ…
Read more »

CPP program to check a number is prime or not using class and object


CPP program to check a number is prime or not using class and object
/* CPP program to check a number is prime or not using class and object 2, 3, 5, 7, ....... */ #include<iostream> using namespace std; class prime{ priv…
Read more »

CPP program to calculate the Factorial of a number using class and object


CPP program to calculate the Factorial of a number using class and object
/* Alamgir Hossain Lecturer, Dept. of CSE, Prime University CPP program to calculate the Factorial of a number using class and object 5! = 5 * 4 * 3 * 2 * 1 =…
Read more »

C program to find maximum and minimum element in an array


C program to find maximum and minimum element in an array
/* Alamgir Hossain Lecturer, Dept. of CSE, Prime University. C program to find maximum and minimum element in array.         Example: 20, 17, 10, 5, 50       …
Read more »

C program to count even and odd elements in an array


C program to count even and odd elements in an array
/* Alamgir Hossain Lecturer, Dept. of CSE, Prime University. C program to count even and odd elements in an array. Array: 20, 12, 13, 50, 17 Even: 3 Odd: 2 */…
Read more »

Major Parts of a C program with proper example


Major Parts of a C program with proper example
/*         01. Documentation Section:         Name: Alamgir Hossain         Date: 23/08/2020         For knowing about major parts. */ #include<stdio.h&…
Read more »

Parameterized constructor in cpp/c++


#include<iostream> using namespace std; class prime{ public:         int id; //Data Member         string name; //Data Member         prime(int value, s…
Read more »

Default constructor with proper example in cpp in bangla


#include<iostream> using namespace std; class prime{ public:         int id; //Data Members         string name; //Data Members         prime(){//Defaul…
Read more »