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 is in all capital letters



Program to check whether a word is in all capital letters..

Answer / shadab alam

using System;
class a
{
public static void Main()
{
Console.WriteLine("Enter a word ");
string s=Console.ReadLine();
char []c=s.ToCharArray();
int ctr=0;
for(int i=0;i<c.Length;i++)
{
if(c[i]>=65 && c[i]<=90)
{
ctr++;
}
else
{
ctr=0;
}

}
if(ctr>0)
{
Console.WriteLine("word are in
capital letter");

}
else
{
Console.WriteLine("word are not in
all capital letter");
}
}
}

Is This Answer Correct ?    2 Yes 2 No

Post New Answer

More OOPS Interview Questions

what is the sylabus for priliminaries?

0 Answers  


What is a null tree?

0 Answers  


WHAT'S THE OOPS BASIC OOPS CONCEPTS IN DOTNET

1 Answers  


143.what is oops principles?

10 Answers  


I hv a same function name,arguments in both base class and dervied class, but the return type is different. Can we call this as a function overloading? Explain?

3 Answers  


What are the 5 oop principles?

0 Answers  


What is a class and object?

0 Answers  


what isthe difference between c structure and c++ class

5 Answers  


What are the OOPS concepts?

106 Answers   A1 Technology, Bajaj, CTS, EDS, HP, Infosys, Intel, Microsoft, MNC, Persistent, PlanetSoft, ProConstructor, TCS, Virtusa, Wipro, YSoft Solutions,


When is an object created and what is its lifetime?

4 Answers   IBM,


suppose A is a base class and B is the derved class. Both have a method foo which is defined as a virtual method in the base class. You have a pointer of classs B and you typecast it to A. Now when you call pointer->foo, which method gets called? The next part of the question is, how does the compiler know which method to call?

3 Answers   EA Electronic Arts,


What is public, protected, private?

6 Answers   IBS, Satyam,


Categories