
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
C++ Articles - Page 533 of 719

868 Views
A bell number is used to denote the number of ways a set of n elements can be partitioned into subsets that are not empty (i.e. have at least one element).In this program, we are given a set of n elements and we have to find the number of ways to partition the set into non-empty subsets.ExampleInput : 3 Output : 5Explanation − let the set of three elements {1, 2, 3}.The subsets are {{1} , {2} , {3}} ; {{1} , {2, 3}} ; {{1 , 2} , {3}} ; {{2} , {1 , 3}} ; {1 , 2 , 3}.Bell ... Read More

18K+ Views
Shell is an interface using which the programmer can execute command and interact directly to the operating system. Shell scripting is giving commands that a shell can execute.In shell also there are variables and operators that are used to manipulate these variables. There are 5 basic operators in shell scripting.Arithmetic OperatorsRelational OperatorsBoolean OperatorsBitwise OperatorsFile Test OperatorsArithmetic OperatorsArithmetic operators in shell scripting are used to perform general arithmetic/ mathematical operations. There are 7 valid arithmetic operators in shell scripting −Addition (+) is used to add two operands (variables).Subtraction (-) is used to subtract two variables (operands) in shell scripting.Multiplication (*) is ... Read More

5K+ Views
Relational Algebra is a procedural query language, it is used to provide a single table / relation as output of performing operations on more than one relations. Some of the basic relations will be discussed here.In our course of learning, we will use three relations (table) −Table 1: courseCourse_idName1Computer science2Information Technology3mechanicalTable 2: studentsRoll No.Nameaddressage1RamDelhi182Rajuhyderabad204FaizDelhi225Salmanhyderabad20Table 3: HostelSt. No.Nameaddressage1RamDelhi182Akashhyderabad203nehaJhansi21On this relations, we will perform some operation to make new relation based on operations performed.Selection operation (σ) − The selection operator denoted by sigma σ is used to select the tuples of a relation based on some condition. Only those tuples that fall ... Read More

21K+ Views
C++ programming language is a versatile programming language. Using C++ you can create low end graphics too i.e. creating basic shapes and words with stylish fonts and adding colors to them can be done using c++.Graphic programming can be done in c++ using your terminal or command prompt or you can download DevC++ compiler to create graphic programs.For terminal you need to add the graphics.h libraray to you GCC compiler. For this you will have type in the following commands.>sudo apt-get install build-essential >sudo apt-get install libsdl-image1.2 libsdl-image1.2-dev guile-2.0 \ guile-2.0-dev libsdl1.2debian libart-2.0-dev libaudiofile-dev \ libesd0-dev libdirectfb-dev libdirectfb-extra libfreetype6-dev \ ... Read More

49K+ Views
Object oriented programming is a type of programming which uses objects and classes its functioning. The object oriented programming is based on real world entities like inheritance, polymorphism, data hiding, etc. It aims at binding together data and function work on these data sets into a single entity to restrict their usage.Some basic concepts of object oriented programming are −CLASSOBJECTSENCAPSULATIONPOLYMORPHISMINHERITANCEABSTRACTIONClass − A class is a data-type that has its own members i.e. data members and member functions. It is the blueprint for an object in object oriented programming language. It is the basic building block of object oriented programming in ... Read More

818 Views
In this tutorial, we will be discussing a program to find the sum of the given series 1 + 1/2^2 + 1/3^3 + …..+ 1/n^n.For this, we will be given with the value of n and our task is to add up every term starting from the first one to find the sum of the given series.Example#include #include using namespace std; //calculating the sum of the series double calc_sum(int n) { int i; double sum = 0.0, ser; for (i = 1; i

232 Views
In this tutorial, we will be discussing a program to find the sum of the given series 23+ 45+ 75+….. upto N terms.For this, we will be given with the value of N and our task is to add up every term starting from the first one to find the sum of the given series.After solving this, we get the formula for the sum of the series;Sn = (2n(n+1)(4n+17)+54n)/6Example#include using namespace std; //calculating the sum of the series int calc_sum(int N) { int i; int sum = (2 * N * (N + 1) * (4 * ... Read More

546 Views
In this tutorial, we will be discussing a program to find the sum of the given series 1/1! + 2/2! + 3/3! + 4/4! +…….+ n/n!.For this, we will be given with the value of n and our task is to add up every term starting from the first one to find the sum of the given series.Example#include using namespace std; //calculating the sum of the series double calc_sum(int n) { int i; double sum = 0, fact=1; for (i = 1; i

146 Views
In this tutorial, we will be discussing a program to find the sum of the given series (1/a + 2/a^2 + 3/a^3 + … + n/a^n).For this, we will be given with the value of n and our task is to add up every term starting from the first one to find the sum of the given series.Example#include #include using namespace std; //calculating the sum of the series float calc_sum(int a, int n) { int i; float sum = 0; for (i = 1; i

366 Views
In this tutorial, we will be discussing a program to find the sum of the given series (1*1) + (2*2) + (3*3) + (4*4) + (5*5) + … + (n*n).For this, we will be given with the value of n and our task is to add up every term starting from the first one to find the sum of the given series.Example#include using namespace std; //calculating the sum of the series int calc_sum(int n) { int i; int sum = 0; for (i = 1; i