Program to check whether a word is in all capital letters
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 |
Why interface is used?
can you give real time example for polymarphism
different types of castings
What is Agile methodology?
20 Answers ABC, Accenture, College School Exams Tests, Inmar, Microsoft, Sapient,
What is the oops and benefits of oops programming?
what is the use of mutable key word
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?
how do you handle yourself when you feel the wald is aganist you
2. Give the different notations for the class.\
why constructor cannt be declar virtually? why destructor cannt be overloaded?
What is encapsulation process?
what are the disadvantages of C++?
25 Answers ATS, Infosys, UNI, Wipro,