Category Archives: C++

Friend Function in C++

Data Hiding is one of the main properties of Object-Oriented Programming and in C++ with the help of access modifiers such as Private, Public and Protected we can alter the privacy of attributes and methods of a Class. In a class, if we have used private modifiers for the class attributes so only that specific… Read More »

C++ vs Java

C++ and Java both support Object-oriented programming and has an approach for statically typed programming too. Though there are many similarities between Java and C++, still contain many distinctions too. There was a time when C++ and Java were fighting head to head for the number 1 programming language, because of the Object-Oriented programming support.… Read More »

Write a C++ Program to perform arithmetic operations using switch case

In this program, we will use the C++ switch case to perform for arithmetic operations such as Addition, Subtraction, Multiplication and Division C++ program to perform arithmetic operations using switch case #include<iostream.h> #include<conio.h> void main() { clrscr(); float num_1,num_2; int operation; cout<<“What Arithmetic Operation You want to perform:\n”; cout<<“Press 1 for Addition \n” ; cout<<“Press… Read More »