Looking for Крос-платформне програмування test answers and solutions? Browse our comprehensive collection of verified answers for Крос-платформне програмування at moodle.chnu.edu.ua.
Get instant access to accurate answers and detailed explanations for your course questions. Our community-driven platform helps students succeed!
( *** CSharp 3.1 *** )
public class One {
public string s; public int n;
public One (string s, int n) {this.s = s; this.n = n;}}
public struct Two {
public string s; public int n;
public Two (string s, int n) {this.s = s; this.n = n;}}
Нехай в клієнтському класі створені об'єкти
One cx = new One ( "Петров", 5), cy = new One ( "Петров", 5), cz = new One ( "Миронов", 4);
Two sx = new Two ( "Петров", 5), sy = new Two ( "Петров", 5), sz = new Two ( "Миронов", 4);
int res = 0;
Відзначте оператори, що не приводять до помилок на етапі компіляції або виконання:
( *** CSharp 3.1 *** )
( *** CSharp 3.1 *** )
( *** CSharp 3.1 *** )
( *** CSharp 3.1 *** )
( *** CSharp 3.1 *** )
( *** CSharp 3.1 *** )
( *** CSharp 3.1 *** )
( *** CSharp 3.1 *** )
public enum Profession {
тесля, столяр, водій, вчитель, лікар}
В результаті виконання фрагмента коду
Profession worker = Profession.плотнік;
worker = worker | Profession.столяр |
(Profession.лікар | Profession.учитель);
Console.WriteLine (worker.ToString ());
буде надруковано:
( *** CSharp 3.1 *** )