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 is basic concept of oop?
What causes polymorphism?
How do you define social class?
What is oops and its features?
What does and I oop mean in text?
What is difference between inheritance and polymorphism?
Why do we use oop?
What are properties in oop?
Why do we use polymorphism in oops?
How do you achieve runtime polymorphism?
What is oops and why we use oops?
What does I oop mean?
What is class and object with example?
#include
What is overriding vs overloading?