Converting lowercase to uppercase in C++

Here we are converting lowercase to uppercase in C++ by using an additional library in our includes;Here is a code which is able of converting a string from lowercase to uppercase: // converting lowercase to uppercase in C++ #include <iostream> #include <cctype> using namespace std; void convertToUppercase( char * );   int main() {     char phrase = "characters and $32.98";     cout << "The phrase before conversion is: " << phrase;     convertToUppercase( phrase );     cout << "nThe phrase after conversion is:  "         << phrase << endl;     return 0;  // indicates successful termination }   // convert string to uppercase letters void convertToUppercase( char *sPtr ) {     while ( *sPtr != '' ) {   // current character is not ''         if ( islower( *sPtr ) )  // if character is lowercase,             *sPtr = toupper( *sPtr );  // convert to uppercase         ++sPtr;  // move sPtr to next character in string     } } in...

Area and Perimeter of rectangle in C++

Area and Perimeter both are the mathematical terms used with rectangle, area is the length multiplied by width while perimeter is the length of all sides of the rectangle. Now how...

Overloading steam insertion and extraction operators in C++

For putting data into the stream and getting data from the stream, the stream insertion and extraction operators are used, Now these operators are already defined for defined datatypes in C++,...

Operator overloading in C++

As we know The variables of primitive data types can perform a number of different operations (functions) using operators like (+, - , /, *)/ For Example:  a + b * c ...

Overloading Addition operator in C++

Here we have overloaded addition operator for a specific class or one can say addition operator is overloaded for a self-defined data type in C++. The code is: ...

Linked Lists with applications in C++

In computer science, linked lists are data structure consisting of a group of nodes which together represent a sequence. Under the simplest form, each node is composed of a data and...

Classes with applications in C++

Classes are defined by using the keyword “ class ”  and have a body closed in braces {}  just like structures and ends with a semicolon( ; ). We cannot initialize...

datatypes in C++

Just like other languages, all variables have a datatypes in C++  ,name, size and value. The detailed info of the datatypes of C++ is: Type Name Bytes Other Names Range of...

Fractional Calculator in C++

We can easily use structures to create a fractional calculator than can solve fractional numbers in C++. It is just an easy approach through structures, we can easily create a simple...

C++ inheritance

lets have a look at the below example: // C++ inheritance #include<iostream> using namespace std;   class Point { protected:     int x,y; public:     Point(int ,int);     void display(void); };   Point::Point(int a,int b) {     x=a;     y=b; }   void Point::display(void) {      cout<<"point = "; }   class Circle : public Point {     double radius; public:     Circle(int ,int ,double );     void display(void); };   Circle::Circle(int a,int b,double c):Point(a,b) {     radius = c; }   void Circle :: display(void) {     Point::display();     cout<<" and radius = "<<radius; }   int main(void) {     Circle c(3,4,2.5);     c.display();     cout<<endl;     return 0; } In the above we took a class “point” in which we defined its attributes (its data members and member functions), then we inherited(derived) the...