Technology Guruu

  • Home
  • Site Info
    • About Us
    • Disclaimer
    • Privacy Polacy
  • Home
  • Digital Marketing
    • SEO
    • SMM
    • SEM
  • Quotes
  • Technical
  • Java
  • .Net
    • C#.Net
    • ASP.Net
  • Keychains

Tuesday, 23 May 2017

Top 5 Questions and Answers in Arrays Using C#.Net

 Akansha     16:30:00     C#.Net, TechnicalQuestions     No comments   

Arrays question and answers in C#.net and we are solving critical programs using arrays it can be used to store multiple values at a time.

Arrays Questions and Answers

arrays

Q)Write a program to accept 6 numbers from console and store in array and find the sum of the number?
class A
{
static void main(0
{
int sum=0;
int[] Ar=new int[6];
for(int i=0;i<=5;i++)
{
Console.WriteLine("enter a number");
Ar[i]=int.parse(Console.ReadLine());
sum=sum+Ar[i];
}
Console.ReadLine("The sum is"+sum);
}
Q)Write a program to accept 7 numbers from console and find the sum of even and sum of odd use arrays?
class A
{
static  void main()
{
int esum=0,osum=0;
int[] Ar=new int[7];
for(int i=0;i<=6;i++)
{
Console.WriteLine("enter a number");
Ar[i]=int.parse(Console.ReadLine()0;
if(Ar[i]/2==0)
esum=esum+Ar[i];
else
osum=osum=Ar[i];
}
Console.WriteLine("the even sum is'+esum);
Console.WriteLine("the odd sum is"+osum);
}
}
Q)Write a program to reverse a string?
class A
{
static void main()
{
String s="satyam";
char[] ch=s.ToCharArray[];
for(int i=5;i>=0;i--)
{
Console.WriteLine(ch[i]);
Console.WriteLine();
}
}
Q)Write a program to check the given string  is polindrome or not?
class A
{
static void main()
{
String s=console.readline();
char[] ch=s.ToCharArray();
int length=ch.length;
while(length-1>=0)
{
revs=revs+ch[length-1];
}
if(s==revs)
{
Console.WriteLine("polindrome");
}
else
Console.WriteLine("not polindrome");
}
}
Q)Write a program  to reverse the words?
class A
{
static void main()
{
String S="Ram,is,good,boy";
String[] s1=s.split();
for(int i=s1.length-1;i>=0;i--)
{
Console.WriteLine(s1[i]+"");
}
Console.WriteLine();
}
Friends you like my programming please share to your friends  and you want more programs please comment on my post.
  • Share This:  
  •  Facebook
  •  Twitter
  •  Google+
  •  Stumble
  •  Digg
Email ThisBlogThis!Share to XShare to Facebook
Newer Post Older Post Home

0 comments:

Post a Comment

Popular Posts

  • Brief description about Delegates
    Introduction about delegates and why delegates are came the main purpose of delegates how to useful and what are the advantages and disadv...
  • How do I increase organic traffic within One Month
    There’s plenty you can do boost organic site traffic at no cost except your time: Optimize for your personas, not search engines.  ...
  • Top Most Differences between windows,web and console applications
    You want to get clarity on any topic the differences very helpful at that time and in these we are having top 5 differences between conso...
  • Brief Description about Multicast Delegate
    Multicast delegate is an extension of normal delegate. It helps you to point more than one method at a single moment of time. Multicast ...
  • How to Remove Audio From Any Video Using VLC Media Player?
    Step by Step Procedure for  Remove(Mute) Audio in a Video Using VLC  Player A picture is worth a thousand words and a video is worth a t...
  • Best Methods To Get A Cheap Home Insurance Deal!
    Cheap Home Insurance Home Insurance is seen as a luxury but in all honesty it is a necessity especially in the case of natural disast...
  • Connected and Disconnected Data Access Architecture
    The Ado.Net Frame Work Supports Two Models of Data Access Architectures one is Connected Oriented architecture and second One is Disconnec...
  • Best Good Afternoon wishes greetings and quotes
    Top Most Good Afternoon Wishes Good Afternoon wishes are gives a relaxation in afternoon time.This wishing can be done between 12 to 3 p...
  • Missing My Friend Quotes : Friendship Day Quotes 2017
    Friends today my article about missing friends and moments with them. Here you are seen the best friendship quotes and some  feelings when...
  • INTERESTING PSYCHOLOGICAL FACTS ABOUT GIRLS Love In Valentines Day
    Girls Love And Caring Love feelings are very interesting to every one and moreover girls feelings are very interesting and amazing a...

Categories

  • Entertainment (67)
  • TechnicalQuestions (58)
  • Quotes (11)
  • C#.Net (8)
  • Java (8)
  • ValentinesDay (4)
  • SEO (3)
  • Home
  • About Us
  • Disclaimer
  • Privacy Policy
  • Sitemap

Copyright © 2015-2017 Good Friends 5.All Rights Reserved• And Our Sitemap • All Logos and Trademark Belongs To Their Respective Owners•