Answers for "using char in c++"

C++
4

char c++

isdigit() - Check if character is decimal digit 
isalpha() - Check if character is alphabetic
isblank() - Check if character is blank
islower() - Check if character is lowercase letter
isupper() - Check if character is uppercase letter
isalnum() - Check if character is alphanumeric
Posted by: Guest on April-10-2021
1

char * in c++

#include <iostream>
using namespace std;

int main() 
{
	char* name = "Raj";	//can store a sequence of characters.
	const char* school = "oxford";
	//school[0] = 'O';		//gives runtime error. We can't modify it.
	cout << name<<" "<<school;
	
	return 0;
}
Posted by: Guest on July-26-2021
0

how to create an array of char in c++

// strings and NTCS:
#include <iostream>
#include <string>
using namespace std;

int main ()
{
  char question1[] = "What is your name? ";
  string question2 = "Where do you live? ";
  char answer1 [80];
  string answer2;
  cout << question1;
  cin >> answer1;
  cout << question2;
  cin >> answer2;
  cout << "Hello, " << answer1;
  cout << " from " << answer2 << "!n";
  return 0;
}
Posted by: Guest on June-04-2020
0

char at in c++

str.at(index)
Posted by: Guest on July-09-2021

Browse Popular Code Answers by Language