Home TechnologyProgramming Subscribe to RSS

Could You Tell Me The Output Of This C#program?

Int i = 5br>string s = Convert.ToString(i);
double d = Convert.ToDouble(i);
Console.writeline(s);
i mean what would be the output for this?....it prints 5 on the screen.Does it show the correct output?

Answer Question

1 Answer - Sort by: Date | Rating

    Int i = 5;   // Define an integer constant and assign the value of 5
                
    string s = Convert.ToString(i); // Define a string constant; convert the integer to a printable character string
                
    double d = Convert.ToDouble(i); // Define a double precision floating point number; convert the integer to floating point
                
    Console.WriteLine(s); // Write the string which is a "5" to the standard output; usually the screen
    2 0

    Jnawrocki 

    answered 1 year ago

      More

         
         

        Ask a Question via Twitter

        Send a question to @askblurtit and we will publish it online and send you a reply everytime you receive an answer.

        Blurtit Store

        Get T-shirts, hoodies, caps and more at the Blurtit store