Q:

iswupper() function in C++

belongs to collection: C++ programs on various topics

0

iswupper() function in C++

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

Program 1:

#include <cwctype> 
#include <iostream> 
using namespace std; 

int main() {   
	wchar_t rs1 = 'H'; 
	wchar_t rs2 = 'e'; 
	wchar_t rs3 = 'l';
	wchar_t rs4 = 'P';

	// Function to check if the character 
	// is a uppercase character or not 
	if (iswupper(rs1)) 
		wcout << rs1 << " is a uppercase "; 
	else
		wcout << rs1 << " is not a uppercase "; 
	wcout << endl; 

	if (iswupper(rs2)) 
		wcout << rs2 << " is a uppercase "; 
	else
		wcout << rs2 << " is not a uppercase "; 
	wcout << endl; 
	
	if (iswupper(rs3)) 
		wcout << rs3 << " is a uppercase "; 
	else
		wcout << rs3 << " is not a uppercase  "; 
	wcout << endl; 
	
	if (iswupper(rs4)) 
		wcout << rs4 << " is a uppercase  "; 
	else
		wcout << rs4 << " is not a uppercase  "; 
	wcout << endl; 

	return 0; 
}

Output

 
H is a uppercase 
e is not a uppercase 
l is not a uppercase  
P is a uppercase  

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

C++ programs on various topics

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now
C++ program to print the left Rotation of the arra... >>
<< iswlower() function in C++...