zoukankan      html  css  js  c++  java
  • 经典.net面试题目(3)

    1. asp.net中web应用程序获取数据的流程:

    A.Web Page B.Fill  C.Sql05  D.Data Sourse  E.DataGrid  F.DataSet  G.Select and Connect

    Commands  H.Sql Data Adapter

    答案:a,e,d,f,h,g,b,c

    2. Asp.net执行模式中各组件填入到对应位置:

    A.Output Cache  B.Parser  C.Assembly Cache  D.IE  E.Memory  F.Compiler

    WebPage被第一次请求时:

    D->__->__->__->__->D

    WebPage被第二次请求时:

    D->__->__->D

    WebPage的页面输出缓存被打开时:

    D->__->D

    答案:

    WebPage被第一次请求时:

    D->_b_->_f_->_a_->_e_->D

    WebPage被第二次请求时:

    D->_b_->_e_->D

    WebPage的页面输出缓存被打开时:

    D->_a_->D

    3.两个数组  [n] [m]  n>m  第一个数组的数字无序排列 第二个数组为空 取出第一个数组的最小值 放到第二个数组中第一个位置, 依次类推. 不能改变A数组,不能对之进行排序,也不可以倒到别的数组中。

    int[] a = { -20, 9, 7, 37, 38, 69, 89, -1, 59, 29, 0, -25, 39, 900, 22, 13, 55 };

                int[] b = new int[10];

                int intTmp = a[0], intMaxNum;

                for (int i = 0; i < a.Length; i++)

                {

                    intTmp = a[i] > intTmp ? a[i] : intTmp;

                }

                intMaxNum = intTmp;

                for (int j = 0; j < b.Length; j++)

                {

                    for (int i = 0; i < a.Length; i++)

                    {

                        if (j == 0)

                            intTmp = a[i] < intTmp ? a[i] : intTmp;

                        else

                        {

                            if (a[i] > b[j - 1])

                                intTmp = a[i] < intTmp ? a[i] : intTmp;

                        }

                    }

                    b[j] = intTmp;

                    intTmp = intMaxNum;

                }

                foreach (int bb in b)

                {

                    Console.WriteLine(bb);

                }

                Console.ReadLine();

    4.请将字符串"I am a student"按单词逆序输出 如"student a am I"

    string S = "I am a student";

                char[] C = new char[] { ' '};

                string[] n =S.Split(C);

                int length = S.Length;

                for (int i =length-1 ; i >=0; i--)

                {

                    Console.Write(n[i]);

                    if (i != 0)

                    {

                        Console.Write(" ");

                    }

                }

  • 相关阅读:
    HDU 2196 Computer
    HDU 1520 Anniversary party
    POJ 1217 FOUR QUARTERS
    POJ 2184 Cow Exhibition
    HDU 2639 Bone Collector II
    POJ 3181 Dollar Dayz
    POJ 1787 Charlie's Change
    POJ 2063 Investment
    HDU 1114 Piggy-Bank
    Lca hdu 2874 Connections between cities
  • 原文地址:https://www.cnblogs.com/Nikola/p/3779806.html
Copyright © 2011-2022 走看看