Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


Program to check whether a word starts with a capital
letter or not.



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

Post New Answer

More OOPS Interview Questions

What is oops with example?

0 Answers  


What is a friend function & its advantage?

1 Answers   MIT,


What is the difference between class and object?

4 Answers   Apple, Heinz,


What is class and object in oops?

0 Answers  


tell about copy constructor

3 Answers   Siemens,


143.what is oops principles?

10 Answers  


what is difference between c++ language and java language

5 Answers  


When is it necessary to use member-wise initialization list in C++?

2 Answers   Adobe,


What is overriding vs overloading?

0 Answers  


What does it mean when someone says I oop?

0 Answers  


define oops with class and object

5 Answers   HCL, Tech Mahindra,


What is polymorphism used for?

0 Answers  


Categories