Question

need help understanding (C#) please include your work ⦁   In general, what is printed by the...

need help understanding (C#) please include your work

⦁   In general, what is printed by the following C# program?
class Demo
{
static void Main(string[] args)
{
for (int i = 0; i < args.Length; i++)
WriteLine(args[i]);
} // End Main
} // End class

0 0
Add a comment Improve this question Transcribed image text
Answer #1
This code prints all the command line arguments.

Example:
if you provide command line arguments "71 82 23 64 85"
Then this code prints 
71 
82 
23 
64 
85

Note: Please comment below if you have any doubts

Please up vote the solution if it helped. Thanks!

Add a comment
Know the answer?
Add Answer to:
need help understanding (C#) please include your work ⦁   In general, what is printed by the...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • What is printed by the following program? class Demonstration {    static void Main()    {...

    What is printed by the following program? class Demonstration {    static void Main()    {    int teamA = 42;    int teamB = 30;    int delta;    while (teamA > teamB)       {       delta = teamA % 5;       teamA = teamA – (delta + 1);     teamB = teamB + delta;       WriteLine(“Team A: {0}   Team B: {1}”, teamA, teamB);       } end while    } // End Main } // End Demonstration

  • Java will be printed 10. can you explain step by step why? public class WhatsPrinted2 {...

    Java will be printed 10. can you explain step by step why? public class WhatsPrinted2 { public static void whatHappens(int A[]) { int []B = new int[A.length]; for (int i=0; i<A.length; i++) { B[i]=A[i]*2; } A=B; } public static void main(String args[]) { int A[] = {10,20,30}; whatHappens(A); System.out.println(A[0]); } } will print 10. explain how it's works. Thanks public class WhatsPrinted3 { public static int[] whatHappens(int A[]) { int []B = new int[A.length]; for (int i=0; i<A.length; i++) {...

  • What are the first five lines printed from this code and why? public class LoopQ {...

    What are the first five lines printed from this code and why? public class LoopQ { public static void main(String[] args) { for(char c = 'A'; c < 'Z'; c++) { for(int i = 0; i < 2; i++) { System.out.println("seat "+c+i); } } } }

  • I must implement a class to calculate n-th row of Pascal's Triangle (in Java). I need...

    I must implement a class to calculate n-th row of Pascal's Triangle (in Java). I need to create a static method that takes an argument "n" and returns the n'th line of pascal's triangle. the main method, which will call the class, is already done and the class is set up. Please build this without modifying the main method and without modifying exactly what the static method returns. public class Main { public static void main(String[] args) { int n...

  • Java 1. Can you explain it how it will be printed step by step? Thanks!! What...

    Java 1. Can you explain it how it will be printed step by step? Thanks!! What is printed by the following? for (int i=1; i<4; i++) { for (char c=’a’; c<=’c’; c++) { if (i%2==0) { i++; System.out.println(i + " " + c); } else { c++; System.out.println(c + " " + i); } } } 2. Is there a compiler error in this code? If so, what is it? If not, what’s printed? Is there a compiler error in...

  • I need to write a program in java that reads a text file with a list...

    I need to write a program in java that reads a text file with a list of numbers and sorts them from least to greatest. This is the starter file. import java.util.*; import java.io.*; public class Lab3 { static final int INITIAL_CAPACITY = 5; public static void main( String args[] ) throws Exception { // ALWAYS TEST FOR REQUIRED INPUT FILE NAME ON THE COMMAND LINE if (args.length < 1 ) { System.out.println("\nusage: C:\\> java Lab3 L3input.txt\n"); System.exit(0); } //...

  • Help In C# CHECKS: Program outputs score before and after bonus Method GiveBonus is overloaded Output:...

    Help In C# CHECKS: Program outputs score before and after bonus Method GiveBonus is overloaded Output: It has to look exactly like that Output Scores was 82.Now it is 5. Grade was B Now it is + --------------------------------------------------------------------- DebugEight2.cs has syntax and/or logical errors. Determine the problem(s), and fix the program. CODE: // Overloaded method gives bonus points // whether grade is a number or letter using static System.Console; class DebugEight2 { static void Main() { int numericScore = 82;...

  • Language is Java. Thank you.It is a review test and I will find out the rest...

    Language is Java. Thank you.It is a review test and I will find out the rest if I just know that answers. 1) What is the output of the following code: public class Test public static void main(String] args) [ String s1 new String("Java String s2 new String("Java) System.out.print( (s1 s2)(s1.equals (s2))) A) false false B) true true C) false true D) true false E) None of the above 2) Given the following program: public class Test f public static...

  • Please Help in C#, Let me know if you have any questions. Please make sure the...

    Please Help in C#, Let me know if you have any questions. Please make sure the program passes the checks Checks: Question: My code works, it just this needs to be added there which I don't know what I need to do.    In order to prepend the $ to currency values, the program will need to use the CultureInfo.GetCultureInfo method. In order to do this, include the statement using System.Globalization; at the top of your program and format the output...

  • Hello, I need help understanding what happens to the value in each loop. I missed a...

    Hello, I need help understanding what happens to the value in each loop. I missed a lot of class so I need help. I decoded the final message but I'm supposed to fill in tables for each function. Homework 4: Program Trace Check out this “instructional” video on decoding strings - http://www.youtube.com/watch?v=zdA__2tKoIU Determine the output of the program below. You will receive no credit for a submission that shows no work. You must make variable tables and show how the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT