Program to check whether a word starts with a capital
letter or not.
Answer / 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 |
What is an orthogonal base class?
Can static class have constructor?
When is a memory allocated to a class?
Can we call a base class method without creating instance?
c++ provides classes...and classes do what we want but why then strcut are used...if we say data hiding... it is also provided by c++ in structs then why to prefer clasess
What are the different forms of polymorphism??
What is coupling in oops?
WHAT IS THE DIFFERENCE BETWEEN OBJECT BASED & OBJECT ORIENTD PROGRAMMING LANGUAGE.(GIVE AT LIST 4 PIONT)
what is the drawback of classical methods in oops?
What is Virtual Keyword?
Write A Program to find the ambiguities in Multiple Inheritance? How are they resolved.(Virtual Functions)
Why is object oriented programming so hard?