C# Questions: 1. BinarySearch() is ____. A. Usable as long as you declare an arr
ID: 3831236 • Letter: C
Question
C# Questions:
1. BinarySearch() is ____.
A. Usable as long as you declare an array
B. A method in the Array class
C. Must be used with integer arguments
D. An instance method
2.
int [ ] anArray = new int [10];
int [ ] anotherArray = {6, 7, 4, 5, 6, 2, 3, 5, 9, 1};
foreach (int val in anotherArray)
total += val;
Using the above declaration along with the foreach loop, what is stored in total after the program statements are executed?
A. 48
B. 10
C. 45
D. 2
3. To declare and instantiate memory for 4 test scores that range in value from 0 to 100, the following declaration could be made ____.
A. Int testScore = new testScore[3];
B. Int testScore[4] = new testScore[ ];
C. Int[ ] testScore = new testScore[4];
D. Int[ ] testScore = new testScore[3];
4. When you use the assignment operator with an array, individual elements are copied to another memory location.
True
False
5. Properties are added to a class to enable client applications to access public members.
True
False
6. C# has two types of string literals. The @-quoted string literals are called ____.
A. Actual string literal
B. Quoted string literal
C. At string literal
D. Verbatim string literal
7. C# uses a row major format for accessing arrays, which means that the elements are printed in rows. Every entry in the first column is printed before moving to the second column.
True
False
8. In order to determine the position of one or more characters inside a string argument, use the ____ method of the string class.
A. Place( )
B. IndexOf( )
C. Location( )
D. Position( )
9.
int [ , , ] anArray = new [3, 2, 7] allows ____ elements to be stored.
A. 3
B. 42
C. 7
D. 12
10. The method in the string class that returns the string in uppercase is ____.
A. ConvertToUpper( )
B. Upper( )
C. StringUpper( )
D. ToUpper( )
11. One of the guidelines for good design is to try to place as many controls on the form as you are able to without overlapping any.
True
False
12. How does a Windows application differ from a console-based application?
A. Unlike Windows applications, console-based applications do not access from the hard drive
B. Windows applications do not have a Main() method.
C. No looping is found with Windows applications.
D. Windows applications sit in a process loop, once executed, waiting for an event to execute.
13. To have the ListBox or ComboBox Items arranged in alphabetical order ____.
A. The values must be originally type in the desired order
B. Set the Ordered property to ascending or descending
C. Use a drag and drop approach move the items into their correct order
D. Set the Sorted property to true
14. Which property is used with the PictureBox control to associate an actual picture to the control?
A. Picture
B. Icon
C. Image
D. Resource
15. ComboBox objects save space on a form through their use of a predefined size property.
True
False
16. Which of the following class has public constructors?
A. StreamReader
B. TextReader
C. File
D. Stream
17.
StreamWriter outputFile = new StreamWriter("someOutputFileName");
StreamReader inputFile = new StreamReader("someInputFileName");
The identifier that can be referenced in a WriteLine( ) method with the declaration above is ____.
A. someInputFileName
B. someOutputFileName
C. inputFile
D. outputFile
18. None of the of the method named in the File and Directory classes are available as instance methods (with the same name) in the FileInfo and DirectoryInfo classes since they are available in File and Directory.
True
False
19. All of the following are core classes that make up the ADO.NET data providers EXCEPT ____.
A. Connection
B. DataReader
C. Command
D. DataSet
20. When accessing data from a database, select the records (and fields) from the database by executing a SQL Fill statement.
True
False
21. The Data Source Configuration Wizard simplifies connecting your application to a data source by guiding you through the process, automatically generating the connection string, creating dataset and table adapter objects, and bringing the data into your application.
True
False
22. A data reader class allows read-only forward retrieval of data from the database.
True
False
23. XHTML Directives are delimited with <% and %>.
True
False
24. Two files are created for each page when you build Web applications. This file ending in .aspx holds the HTML tags.
True
False
25. Selecting HTTP for the File Location, stores files, by default, in the C:Inetpubwwwroot directory.
True
False
26. Which of the following is an example of a scripting language that might be used to create a dynamic web page?
A. C# Script
B. C Script
C. JavaScript
D. All of the above
27. What is one of the major differences between an ASP .NET application that you build and a Windows application?
A. You can drag and drop controls onto the Windows form
B. Windows applications are event driven applications
C. Two separate files are created for the user interface for Web applications
D. All of the control classes are organized under a common namespace for Windows applications
28. Style sheet includes a list of rules. Each rule consists of ____.
A. A tag and an attribute
B. One or more property
C. A selector and one or more declaration blocks
D. An outline body
Explanation / Answer
1. BinarySearch () is ------------
B. A method in the array class .
That helps to find the array position of a requested value in an array , which is passed in the method as parameters
3. To declare and instantiate memory for 4 test scores that range in value from 0 to 100, the following declaration could be made ____.
C. . Int[ ] testScore = new testScore[4];
Testscore is the name of the arraywhich is deaclared as integer , and assigned 4 values to it .
4. When you use the assignment operator with an array, individual elements are copied to another memory location.
B . False
The assignment operator when used with refrence type such as array may not work as we think , If an array is defined and an assignment is made , the assignment operator and the array refrence the same element.Individual elements are not copied to another memry location .
14. Which property is used with the PictureBox control to associate an actual picture to the control?
C. IMAGE
Image property is used to display the image either at design time or at run time .
27. What is one of the major differences between an ASP.NET application that you build and a window application you build ?
C. Two seprate files are created for the user interface for ASP.NET (web) application
both of these file must be available to the web server for diaplay of the website . one of these files contain visual HTML and other conatins the logic .
28. Style Sheet include a list of rules , each rule consists of ------
C. A selector and oneor more declaration blocks .
declaration blocks is enclosed in curly braces , Inside the block you will find a property , a value , colon . Style rule for body is used when dynamic page of website is created .
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.