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 are the advantages of polymorphism?

1035


Explain the concepts involved in Object Oriented programming.

1249


What is ambiguity in inheritance?

1122


What is the real time example of inheritance?

1155


What do you mean by variable?

1047


What is destructor example?

1055


What is the highest level of cohesion?

1055


Why do pointers exist?

1104


What is polymorphism and types?

1112


How is polymorphism achieved?

1060


What is the purpose of enum?

1013


What is difference between polymorphism and inheritance?

1094


Is this job good for future? can do this job post grduate student?

2166


What are the features of oop?

1184


can we make game by using c

4152