One set of. Net interview questions ~ No correct answer ~ What do you do?

Source: Internet
Author: User

1) What is the highest. Net class that everything is derived from?
A) system. Data;
B) system. codedom;
C) system. object;
D) system. IO;

2) What is the. NET collection class that allows an element to be accessed
Using a unique key?
A) arraylist;
B) hashtable;
C) stack;
D) queue;

3) After user has successfully logged in, user information is not stored in:
A) viewstate
B) Cookie
C) session

4) A structure in C # can be derived from one or more:
A) Classes
B) interfaces
C) Both
D) None

5) which of the following mode is not available for storage in the ASP. NET
Session state?
A) In-Proc
B) StateServer
C) sqlserver
D) client-side

6) How can a web application get configured with the following
Authorization rules? Anonymous Users must not be allowed to access
The application. All persons should t David and John must be allowed
To access the application.
A) <authorization>
<Deny users = "applicationname \ David, applicationname \ John">
<Allow roles = "*">
<Deny roles = "? ">
</Authorization>

B) <authorization>
<Deny users = "applicationname \ David, applicationname \ John">
<Deny users = "? ">
<Allow users = "*">
</Authorization>

C) <authorization>
<Allow users = "*">
<Deny users = "applicationname \ David; applicationname \ John">
<Deny users = "*">
</Authorization>

D) <authorization>
<Allow users = "*">
<Deny users = "applicationname \ David, applicationname \ John">
</Authorization>

7) What is the difference between ienumerator and enumeration?
A) ienumerator is an interface. enumeration is a datatype.
B) both are the same.
C) ienumerator is used to define a variable of an enumeration datatype.

8) What is the fastest way to check whether a string is empty or not in the following code?
A) bool isempty = (Str. Length = 0 );
B) bool isempty = (STR = string. Empty );
C) bool isempty = (STR = "");
D) bool isempty = (Str. Equals (""));

9) What is the output for the following code snipet?
(A) 112
(B) 123
C) 012
(D) 122
Interface iaddone
{
Int addone ();
}
Struct fixpoint: iaddone
{
Int _ x;
Public fixpoint (int x)
{
_ X = X;
}

Public int addone ()
{
++ _ X;
Return _ x;
}
}

Arraylist pointlist = new arraylist (1 );
Fixpoint F = new fixpoint (0 );
Pointlist. Add (f );

Console. Write (F. addone ());
Console. Write (iaddone) pointlist [0]). addone ());
Fixpoint P = (fixpoint) pointlist [0];
Console. Write (P. addone ());

10) when creating an MDI application, which of the following sentences must be used to mark the form as the parent form?
A) This. ismdicontainer = true;
B) This. mdiparent = this;
C) This. mdiparent = NULL;
D) This. ismdicontainer = false;

11) there is a table name [Table1] in a database, it contains a varcharcolumn named [col1] And a datetime column named [col2], and a STR which is a string variable in C # code. which SQL is right?
A) strsql = "select * from [Table1] Where [col1] =" + STR + "and
[Col2] <getdate ()";
B) strsql = "select * from [Table1] Where [col1] = '" + STR + "' and
[Col2] <"+ getdate ();
C) strsql = "select * from [Table1] Where [col1] = '" + STR + "' and
[Col2] <getdate ()";
D) strsql = "select * from [Table1] Where [col1] = STR and [col2] <
Getdate ()";
12) evaluate these two SQL statements. Which statement is the most correct?
Select last_name, salary, hire_date
From employees
Order by salary DESC;

Select last_name, salary, hire_date
From employees
Order by 2 DESC;

A) the two statements produce identical results.
B) the second statement returns a syntax error.
C) there is no need to specify DESC because the results are sorted in
Descending order by default.
D) the two statements can be made to produce identical results
Adding a column alias for the salary column in the second SQL
Statement.
13) which function will be run first?
<HTML>
<Head>
<Script language = "JavaScript">
Function startsub ()
{
Alert ("script start! ");
}
Function anothersub ()
{
Alert ("script run! ");
}
Function endsub ()
{
Alert ("script end! ");
}
</SCRIPT>
</Head>
<Body onload = "anothersub ()">
<SCRIPT>
Endsub ();
</SCRIPT>
</Body>
</Html>

A) startsub
B) endsub
C) anothersub
D) onload

14) a Java Script provides 3 dialog boxes. In which dialog box
Can the operator input text? :
A) Alert
B) confirm
C) Prompt
15) What is the result of "S "?
<Script language = JavaScript>
VaR S = ""
VaR A = 1;
VaR B = ++;
C = B ++;
S = a + "," + B + "," + c
</SCRIPT>

(A) 123
(B) 223
(C) 232
(D) 233

Part II
Please choose to answer any two questions out of the following three.
1) given a relationship EMP (Eno, ename, salary, DNO) with attributes indicating employee ID, name, salary, and department number, respectively, and a relationship dept (DNO, dname, manager) with attributes indicating Department number, Department name and employee ID of department manager, respectively; implement the following funwing with SQL statements:

1. The average salary of employees in each department whose salary is not less than 600 yuan.
2. A stored procedure that determines which department an employee works in through the employee's ID.

 

2) programming (C #)
1. implement a supermarket class to describe a supermarket and compile the following functions: append () to record existing goods and define goods to be added, delete () to remove goods, query () to search for goods and display the result.

2. define a class goods with attributes of name (name of goods), price (price of goods), and number (quantity of goods ), and actions of sale (goods selling with prompt for insufficient remain), add (putting goods on shelf) and showme (displaying information on goods ).

3. Write a main function and test the features above, namely, adding, deleting and querying goods, as well as selling goods and putting goods on shelf.

3) programming (C #)
Public class compute1

{

Private double element1, element2;

Public compute1 (double comelement1, double comelement2)

{

This. element1 = comelement1;

This. element2 = comelement2;

}

Public double add ()

{

Return element1 + element2;

}

Public double subtract ()

{

Return element1-element2;

}

}

Public interface icompute

{

Double implyadd ();

Double implysubtract ();

Double implymultiply ();

Double implydiv ();

}

1. Write a class inheritance interface compute and use the proved methods in computel.

2. Verify the parameters before you implement implydiv () method.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.