Posts

Showing posts from October, 2020

CONVERT STRING TO CAMEL CASE IN C ++

// 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               s[i + 1] = toupper (s[i + 1]);               continue ;        ...