What is the output of: byte b = 255; b++; Console.WriteLine(b);?
Correct answer A. 0
Subject / 929 questions
Page 24 of Programming multiple-choice questions with answers. Tap an option to check yourself.
Page 24 of 47
Correct answer A. 0
Correct answer A. three
Correct answer D. Control cannot fall through from one non-empty case section to the next
Correct answer B. A relational pattern
Correct answer B. That s is not null and its Length property is greater than 3
Correct answer C. An InvalidOperationException is thrown when the loop continues
Correct answer D. 2
Correct answer B. The method must assign it before returning; the caller need not initialise it
Correct answer B. The argument is passed by reference but cannot be modified by the method
Correct answer B. 0
Correct answer D. They must come after all required parameters and have compile-time constant defaults
Correct answer C. Show(b: 2, a: 1)
Correct answer C. int Get(int x) and string Get(int x)
Correct answer A. It must be a static method in a non-generic static class, with this before the first parameter
Correct answer C. A method declared inside another method and visible only within it
Correct answer A. A class is a reference type, while a struct is a value type copied on assignment
Correct answer D. 1
Correct answer A. True
Correct answer B. Creates a copy of p1 with Y changed to 5, leaving p1 unchanged
Correct answer B. Once, automatically, before the first instance is created or any static member is accessed