Posts

camel case notation

Image
CamelCase notation is a common name for the practice of writing compound words or phrases where the words are. joined without spaces, and each word is capitalized within the compound. This practice is known by a large variety. of names, including BiCapitalization, InterCaps, MixedCase, etc. example: input: // CPP program to convert given sentence  /// to camel case. #include <bits/stdc++.h> using namespace std;   // Function to remove spaces and convert // into camel case string convert(string s) {      int n = s.length();        int res_ind = 0;        for ( int i = 0; i < n; i++) {            // check for spaces in the sentence          if (s[i] == ' ' ) {                // conversion into upper case     ...

operator in c++

Image
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations. C++ is rich in built-in operators and provide the following types of operators − Arithmetic Operators Relational Operators Logical Operators Bitwise Operators Assignment Operators Misc Operators This chapter will examine the arithmetic, relational, logical, bitwise, assignment and other operators one by one. Arithmetic Operators There are following arithmetic operators supported by C++ language − Assume variable A holds 10 and variable B holds 20, then − Show Examples Operator Description Example + Adds two operands A + B will give 30 - Subtracts second operand from the first A - B will give -10 * Multiplies both operands A * B will give 200 / Divides numerator by de-numerator B / A will give 2 % Modulus Operator and remainder of after an integer division B % A will give 0 ++ Increment operator , increases integer value by one A++ will give 11 -- Decrement operator , decreases in...