CPP Programs

There is no learning without practicals. Here you can practice C++ (CPP) programs, from beginner’s level to expert’s level. You can think C++ practicals in two parts, first one is to develop your basic programming skills using decision controls, loops, functions, arrays and strings. In the second part you can build object oriented skills.







Warm up

Decision Control

Loop

  • Write a CPP program to calculate sum of first N natural numbers
  • Write a CPP program to calculate factorial of a number
  • Write a CPP program to print N terms of Fibonacci series
  • Write a CPP program to check whether a given number is prime or not

Function

  • Write a CPP function to calculate area of a circle
  • Write a CPP function to calculate LCM of two numbers
  • Write a CPP function to calculate HCF of two numbers
  • Write a CPP function to find next prime number of a given number

Function Overloading

Classes and Objects

Operator Overloading

Inheritance

File Handling

Data Structure in C++