PRN 1178 client centered care 2 exam 1: Questions &
Answers: A+ Score Solution
1. Unlike const however, read-only fields are NOT______
A. explicitly internal
B. explicitly static
C. implicitly static
D. implicitly internal - ANSWERC
2. What can be signature of an application's entry point?
A. public static void Main(string s){}
B. public static void main() {}
C. public static void Main() {}
D. public static void Main(int n) {} - ANSWERC
3. Web service technology is based on?
A. SOAP and TCP/IP
B. TCP/IP and UDP
C. UDP and XML
D. XML and SOAP - ANSWERD
4. Which sentence is correct?
A. The method on which a delegate makes calls cannot have any arguments.
B. A delegate must define name of the method on which it makes calls.
C. The method on which a delegate makes calls cannot have return type. - ANSWERB
5. _______is .NET equivalent of Java Virtual Machine (JVM).
A. CLS
B. CTS
,C. CLR
D. Base Class Library - ANSWERC
6. What is output of the following code?
(see picture)
class Animal{
public void Display(){
System.Consoie.WriteLine("Display of Animal class");
}
class Mammal : Animal
{
public new void Display()
{
base.Display():
System.Consoie.WriteLine("Display of Mammal class");
}
static void Main(string[] args)
{
Mammai m1 = new Mammal();
m1.Display();
}
}
A. Display of Mammal class
B. Display of Animal class
C. Compile error
D. Display of Animal class
Display of Mammal class - ANSWERD
7. The scope of a variable runs from the point of declaration to the end of the
A. method.
B. enclosing block.
C. application.
D. class. - ANSWERB
8. Which is the most suitable statement to fill the missing code (line 12), if you want
to build an in-house XML Web service?
,//All necessary namspaces have already been used.
// Consider the following piece of code:
[WebService(Description = "The Calculator Web Service",
Name = "CalculatorWebService")]
//missing code // line 12
public class Service : System.Web.Services.Webservice
{
[WebMethod(Description = "Subtracts two integers.")]
public int Subtract(int x, int p] { return x - y;}
[WebMethod(Description = "Adds two float.", MessageName = "AddFloat")]
public float add(float x, float y) { return x + y;}
[WebMethod(Description = "Adds two integers.", MessageName = "AddInteger")]
public int add(int x, int y) { return x + y;}}
A. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
B. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1,
EmitConformanceClaims = false)]
C. [WebServiceBinding(C - ANSWERD
9. Which sentence about the C# class types is correct?
A. C# classes can define some constructors.
B. C# classes can define any number of destructors.
C. C# classes can define only one constructor.
D. C# classes do not support destructors. - ANSWERA
10. Which type is a handy programming construct that allows to group name/value
pairs?
A. Enumeration.
B. Class.
C. Delegate.
D. Interface. - ANSWERA
, 11. What is output of the following code?
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}
static void DisplayHello()
{
Console.WriteLine("Hello");
}
}
A. Hello
B. Compile error at line: delegate void Display();
C. Compile error at line: d1();
D. Runtime error - ANSWERA
12. An assembly consists of Assembly Metadata, Type Metadata, ______and______
A. Classes and IL Code
B. Type Declaration and Resources
C. Resources and Classes
D. IL Code and Resources - ANSWERD
13. In Windows Forms applications, ____ property is used to get or set a value that is
returned to the parent form when the button is clicked.
A. ButtonValue
B. ResultDialog
C. ButonResult
D. DialogResult
Answers: A+ Score Solution
1. Unlike const however, read-only fields are NOT______
A. explicitly internal
B. explicitly static
C. implicitly static
D. implicitly internal - ANSWERC
2. What can be signature of an application's entry point?
A. public static void Main(string s){}
B. public static void main() {}
C. public static void Main() {}
D. public static void Main(int n) {} - ANSWERC
3. Web service technology is based on?
A. SOAP and TCP/IP
B. TCP/IP and UDP
C. UDP and XML
D. XML and SOAP - ANSWERD
4. Which sentence is correct?
A. The method on which a delegate makes calls cannot have any arguments.
B. A delegate must define name of the method on which it makes calls.
C. The method on which a delegate makes calls cannot have return type. - ANSWERB
5. _______is .NET equivalent of Java Virtual Machine (JVM).
A. CLS
B. CTS
,C. CLR
D. Base Class Library - ANSWERC
6. What is output of the following code?
(see picture)
class Animal{
public void Display(){
System.Consoie.WriteLine("Display of Animal class");
}
class Mammal : Animal
{
public new void Display()
{
base.Display():
System.Consoie.WriteLine("Display of Mammal class");
}
static void Main(string[] args)
{
Mammai m1 = new Mammal();
m1.Display();
}
}
A. Display of Mammal class
B. Display of Animal class
C. Compile error
D. Display of Animal class
Display of Mammal class - ANSWERD
7. The scope of a variable runs from the point of declaration to the end of the
A. method.
B. enclosing block.
C. application.
D. class. - ANSWERB
8. Which is the most suitable statement to fill the missing code (line 12), if you want
to build an in-house XML Web service?
,//All necessary namspaces have already been used.
// Consider the following piece of code:
[WebService(Description = "The Calculator Web Service",
Name = "CalculatorWebService")]
//missing code // line 12
public class Service : System.Web.Services.Webservice
{
[WebMethod(Description = "Subtracts two integers.")]
public int Subtract(int x, int p] { return x - y;}
[WebMethod(Description = "Adds two float.", MessageName = "AddFloat")]
public float add(float x, float y) { return x + y;}
[WebMethod(Description = "Adds two integers.", MessageName = "AddInteger")]
public int add(int x, int y) { return x + y;}}
A. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
B. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1,
EmitConformanceClaims = false)]
C. [WebServiceBinding(C - ANSWERD
9. Which sentence about the C# class types is correct?
A. C# classes can define some constructors.
B. C# classes can define any number of destructors.
C. C# classes can define only one constructor.
D. C# classes do not support destructors. - ANSWERA
10. Which type is a handy programming construct that allows to group name/value
pairs?
A. Enumeration.
B. Class.
C. Delegate.
D. Interface. - ANSWERA
, 11. What is output of the following code?
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}
static void DisplayHello()
{
Console.WriteLine("Hello");
}
}
A. Hello
B. Compile error at line: delegate void Display();
C. Compile error at line: d1();
D. Runtime error - ANSWERA
12. An assembly consists of Assembly Metadata, Type Metadata, ______and______
A. Classes and IL Code
B. Type Declaration and Resources
C. Resources and Classes
D. IL Code and Resources - ANSWERD
13. In Windows Forms applications, ____ property is used to get or set a value that is
returned to the parent form when the button is clicked.
A. ButtonValue
B. ResultDialog
C. ButonResult
D. DialogResult