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.

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


Please Help Members By Posting Answers For Below Questions

What is constructor overloading in oop?

1182


What are main features of oop?

1181


What does and I oop mean?

1285


What are the benefits of oop?

1348


What is difference between inheritance and polymorphism?

1077


What is basic concept of oop?

1225


What is the renewal class?

2823


What is inheritance in oop?

1092


What is the use of oops?

1116


What is polymorphism what are the different types of polymorphism?

1067


What is difference between polymorphism and inheritance?

1135


How do you define social class?

1118


what is the sylabus for priliminaries?

2227


Why do pointers exist?

1154


What is this pointer in oop?

1128