Program to check whether a word starts with a capital
letter or not.
Answer Posted / zaideeabu
// Untested possible answer
// Which perhaps combined C & C++ style :P
#include <iostream.h>
#include <string.h>
int main(int argc, char * argv[])
{
char cA = 'A';
char cZ = 'Z';
char str[1024] = {0};
strncpy(str, argv[1], 1024);
if ( str[0] <= cA || str[0] >= cZ )
cout << "String: " << str << " does not start with
capital letter." << endl;
else
cout << "String: " << str << " starts with capital
letter."
return 0;
}
| Is This Answer Correct ? | 4 Yes | 3 No |
Post New Answer View All Answers
What are the data types in oop?
What is polymorphism and its types?
What does and I oop mean?
What is the benefit of oop?
which feature are not hold visual basic of oop?
What are classes oop?
given a set based questions and 5 questions based on it next data sufficiciency questions 2 and 2/3 english sentence completion with options very easy and 2 synononmys paragraph with 10 questions 10 minutes replace =,-,*,% with -,%,+,* type questions 5 3 questions lik following itssickhere itssickthere itssickhere istsickhere which is nt alike the others very easy
How is polymorphism achieved?
What is multilevel inheritance in oop?
What do you mean by overloading?
2. Give the different notations for the class.\
What is abstraction in oop?
Where You Can Use Interface in your Project
What is meant by multiple inheritance?
What is the use of oops?