Horje
c++   check first character of string Code Example
c++ check first character of string
#include <iostream>
#include <string>

int main() 
{
  string str{};     // creating string
  getline(cin, str);// using getline for user input
  std::cout << str; // output string namePerson
  if (str[0] >= 'a' || str[0] <= 'z')
    str[0] -= 32;
  return (0);
}




Cpp

Related
delete a head node in link list Code Example delete a head node in link list Code Example
c++ print hello world Code Example c++ print hello world Code Example
vbs check if file exists Code Example vbs check if file exists Code Example
fork c Code Example fork c Code Example
change to lowercase in notepad++ Code Example change to lowercase in notepad++ Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
10