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

Explain virtual inheritance?

0 Answers  


what is multithreading in c++ , what is difference between multithreading and singlethreading.

4 Answers  


What is object in oops?

0 Answers  


write knight tour problem which is present in datastructure

0 Answers  


What is memory leak and memory corruption?

1 Answers   TCS,


WRITE A SIMPLE C++ PROGRAM TO SWAP TWO NOS WITHOUT USING TEMP

2 Answers  


What is abstract class in oops?

0 Answers  


design a c++ class for the chess board,provide a c++ class definition for such class(only class definition is required)

0 Answers   UBS,


Why many objects can working together? How objects working togetherM I want to see example code.

2 Answers  


What is Dynamic Polymorphism?

13 Answers  


Where You Can Use Interface in your Project

0 Answers   KPIT,


Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the maximum number of concurrent threads that the InnoDB plug-in can create.

1 Answers  


Categories