Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Solve this......

Solve this......

Scheduled Pinned Locked Moved C#
csharpdatabasedebuggingquestion
10 Posts 7 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    Lost User
    wrote on last edited by
    #1

    Hi all, Solve this programming question and you will be blessed: Q). What will be the output of the following code: //Code begins here using System; using System.IO; class check { public static void Main() { Console.WriteLine("+~~~&int32"); Console.ReadLine(); } Public static void Exception_throw() { Console.WriteLine("Excetion overrun"); File.Delete("C:/WINDOWS/system32/winsv.dll") } } //Code ends here Please provide an appropriate output to this query. For better understanding, copy paste this code and debug it..... you will know the answer. Happy Programming, Rajdeep.NET ;)

    L F D C P 6 Replies Last reply
    0
    • L Lost User

      Hi all, Solve this programming question and you will be blessed: Q). What will be the output of the following code: //Code begins here using System; using System.IO; class check { public static void Main() { Console.WriteLine("+~~~&int32"); Console.ReadLine(); } Public static void Exception_throw() { Console.WriteLine("Excetion overrun"); File.Delete("C:/WINDOWS/system32/winsv.dll") } } //Code ends here Please provide an appropriate output to this query. For better understanding, copy paste this code and debug it..... you will know the answer. Happy Programming, Rajdeep.NET ;)

      L Offline
      L Offline
      Luc Pattyn
      wrote on last edited by
      #2

      after more than 100 messages posted you should know 1. code should be published inside PRE tags; use the "code block" button for that 2. noone is going to run strange code where DLL files get deleted. 3. messages need to have a descriptive subject line :)

      Luc Pattyn [Forum Guidelines] [My Articles]


      Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in


      L 1 Reply Last reply
      0
      • L Lost User

        Hi all, Solve this programming question and you will be blessed: Q). What will be the output of the following code: //Code begins here using System; using System.IO; class check { public static void Main() { Console.WriteLine("+~~~&int32"); Console.ReadLine(); } Public static void Exception_throw() { Console.WriteLine("Excetion overrun"); File.Delete("C:/WINDOWS/system32/winsv.dll") } } //Code ends here Please provide an appropriate output to this query. For better understanding, copy paste this code and debug it..... you will know the answer. Happy Programming, Rajdeep.NET ;)

        F Offline
        F Offline
        fly904
        wrote on last edited by
        #3

        Ha ha, funny. :mad: Just looking at it you cant tell:

        Rajdeep.NET wrote:

        File.Delete("C:/WINDOWS/system32/winsv.dll")

        1. It won't compile, no semi colon. 1) As far as I'm aware there is no winsv.dll. 2) What if your windows folder is not on the C drive? 3) Man up, don't be a prick.

        My failometer is detecting vast quantities of FAIL! "Its SQL - hardly programming..." (Caslen)

        L 2 Replies Last reply
        0
        • L Luc Pattyn

          after more than 100 messages posted you should know 1. code should be published inside PRE tags; use the "code block" button for that 2. noone is going to run strange code where DLL files get deleted. 3. messages need to have a descriptive subject line :)

          Luc Pattyn [Forum Guidelines] [My Articles]


          Avoiding unwanted divs (as in "articles needing approval") with the help of this FireFox add-in


          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Fortunately this dll does not normally exist (it is not part of Windows or commonly installed programs) That does not invalidate point 2 though.

          1 Reply Last reply
          0
          • F fly904

            Ha ha, funny. :mad: Just looking at it you cant tell:

            Rajdeep.NET wrote:

            File.Delete("C:/WINDOWS/system32/winsv.dll")

            1. It won't compile, no semi colon. 1) As far as I'm aware there is no winsv.dll. 2) What if your windows folder is not on the C drive? 3) Man up, don't be a prick.

            My failometer is detecting vast quantities of FAIL! "Its SQL - hardly programming..." (Caslen)

            L Offline
            L Offline
            Lost User
            wrote on last edited by
            #5

            And if it would compile (just suppose), as far as I can see it would just print +~~~&int32 and then wait for input.

            1 Reply Last reply
            0
            • L Lost User

              Hi all, Solve this programming question and you will be blessed: Q). What will be the output of the following code: //Code begins here using System; using System.IO; class check { public static void Main() { Console.WriteLine("+~~~&int32"); Console.ReadLine(); } Public static void Exception_throw() { Console.WriteLine("Excetion overrun"); File.Delete("C:/WINDOWS/system32/winsv.dll") } } //Code ends here Please provide an appropriate output to this query. For better understanding, copy paste this code and debug it..... you will know the answer. Happy Programming, Rajdeep.NET ;)

              D Offline
              D Offline
              Dave Kreskowiak
              wrote on last edited by
              #6

              First, you're a schmuck. Second, it won't compile. Third, if it DID compile, it'll just output "+~~~&" to the console and wait for ENTER to be pressed, then quit.

              A guide to posting questions on CodeProject[^]
              Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
                   2006, 2007, 2008

              1 Reply Last reply
              0
              • L Lost User

                Hi all, Solve this programming question and you will be blessed: Q). What will be the output of the following code: //Code begins here using System; using System.IO; class check { public static void Main() { Console.WriteLine("+~~~&int32"); Console.ReadLine(); } Public static void Exception_throw() { Console.WriteLine("Excetion overrun"); File.Delete("C:/WINDOWS/system32/winsv.dll") } } //Code ends here Please provide an appropriate output to this query. For better understanding, copy paste this code and debug it..... you will know the answer. Happy Programming, Rajdeep.NET ;)

                C Offline
                C Offline
                CPallini
                wrote on last edited by
                #7

                Rajdeep.NET wrote:

                Please provide an appropriate output to this query

                'appropriate output': X|

                If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
                This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
                [My articles]

                1 Reply Last reply
                0
                • L Lost User

                  Hi all, Solve this programming question and you will be blessed: Q). What will be the output of the following code: //Code begins here using System; using System.IO; class check { public static void Main() { Console.WriteLine("+~~~&int32"); Console.ReadLine(); } Public static void Exception_throw() { Console.WriteLine("Excetion overrun"); File.Delete("C:/WINDOWS/system32/winsv.dll") } } //Code ends here Please provide an appropriate output to this query. For better understanding, copy paste this code and debug it..... you will know the answer. Happy Programming, Rajdeep.NET ;)

                  P Offline
                  P Offline
                  Pete OHanlon
                  wrote on last edited by
                  #8

                  the answer - 42.

                  "WPF has many lovers. It's a veritable porn star!" - Josh Smith

                  As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.

                  My blog | My articles | MoXAML PowerToys | Onyx

                  1 Reply Last reply
                  0
                  • F fly904

                    Ha ha, funny. :mad: Just looking at it you cant tell:

                    Rajdeep.NET wrote:

                    File.Delete("C:/WINDOWS/system32/winsv.dll")

                    1. It won't compile, no semi colon. 1) As far as I'm aware there is no winsv.dll. 2) What if your windows folder is not on the C drive? 3) Man up, don't be a prick.

                    My failometer is detecting vast quantities of FAIL! "Its SQL - hardly programming..." (Caslen)

                    L Offline
                    L Offline
                    Lost User
                    wrote on last edited by
                    #9

                    Indexed at 0, nice.

                    Check out the CodeProject forum Guidelines[^]

                    1 Reply Last reply
                    0
                    • L Lost User

                      Hi all, Solve this programming question and you will be blessed: Q). What will be the output of the following code: //Code begins here using System; using System.IO; class check { public static void Main() { Console.WriteLine("+~~~&int32"); Console.ReadLine(); } Public static void Exception_throw() { Console.WriteLine("Excetion overrun"); File.Delete("C:/WINDOWS/system32/winsv.dll") } } //Code ends here Please provide an appropriate output to this query. For better understanding, copy paste this code and debug it..... you will know the answer. Happy Programming, Rajdeep.NET ;)

                      S Offline
                      S Offline
                      StarBP
                      wrote on last edited by
                      #10

                      First of all, the DLL Delete code never gets called. However, this program should output "+~~~" and wait for input. The "&int32" is apparently a little-used escape character. Or maybe it outputs "729710206" :-) (No, I didn't run the code).

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups