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 |
What is encapsulation in simple terms?
Explain the advantages of inheritance.
What do you mean by variable?
143.what is oops principles?
Which is the best institute in hyderabad for C/C++ and it also has fast track course structure.
what is the basic concept of inheritance?
What is solid in oops?
They started with the brief introduction followed by few basic C++ questions on polumorphism, inheritance and then virtual functions. What is polymorphims? How you will access polymorphic functions in C? How virtual function mechanism works?
What is difference between abstraction and encapsulation?
What is an example of genetic polymorphism?
What do we mean by a hidden argument in a function?
Can a destructor be called directly?