Answers for "char [10] cpp"

C++
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

Browse Popular Code Answers by Language