
Call 1800-123-2003
"Smartindia is the best online tool for school students." Ms Deepa Chandran, Principal Anchal
"Smartindia is one of the best supplementary education tool for school students." Ms Pooja, Principal
What is wrong with the usages of the following functions? a) tolower ("hello") b) pow (5, 2.5) |
As indicated by Banfa you need to include the appropriate header but also the function tolower() takes a single character (Iint) as a parameter and returns the corresponding lowercase letter (int), i.e. #include<iostream> #include<cctype> // for tolower() using namespace std; int main() { char upper[]="HELLO", lower[10]={0}; int i; for(i=0; i<strlen(upper); i++) lower[i] = tolower(upper[i]); // convert each character cout<< lower << endl; cin.get(); } |