模擬題1:
https://ks.wjx.top/jq/40059499.aspx
選擇題(針對(duì)下列題目伤靠,選擇符合題目要求的答案旺韭。針對(duì)每一道題目,全選對(duì)君账,則該題得分;所選答案錯(cuò)誤或漏選沈善,則該題不得分乡数。每題2分。)
[if !supportLists]1.?[endif]每個(gè)數(shù)據(jù)庫可以有一個(gè)或多個(gè)事務(wù)日志文件闻牡,其擴(kuò)展名為()净赴。
A. MDF???? B.NDF
C. LDF D.DBF
[if !supportLists]2.?[endif]C#中導(dǎo)入某一命名空間的關(guān)鍵字是( ????)。
[if !supportLists]A.?[endif]using???B. use ??C. import ??????D. include
[if !supportLists]3.?[endif]在類的定義中罩润,類的()描述了該類的對(duì)象的行為特征玖翅。
[if !supportLists]A.?[endif]類名B. 方法??C. 所屬的命名空間 ?D. 私有域
[if !supportLists]4.?[endif]在WinForm窗體中,ListView控件具有多種顯示視圖割以,其中不包括()金度。
A.詳細(xì)視圖 ???????????????????????B.超大圖標(biāo)
C.大圖標(biāo) ?????????????????????????D.平鋪
[if !supportLists]5.?[endif]在C#中,下列選項(xiàng)()不是異常處理的結(jié)構(gòu)。
[if !supportLists]A.?[endif]try...catch
[if !supportLists]B.?[endif]try...finally
[if !supportLists]C.?[endif]try...catch...finally
[if !supportLists]D.?[endif]catch...finally
[if !supportLists]6.?[endif]在WinForm窗體中严沥,關(guān)于定時(shí)器Timer审姓,下列說法有誤的是()。
[if !supportLists]A.?[endif]Timer控件用于定時(shí)引發(fā)事件
[if !supportLists]B.?[endif]定時(shí)間隔由屬性Interval設(shè)置祝峻,其單位是秒
[if !supportLists]C.?[endif]定時(shí)引發(fā)的事件是Tick事件
[if !supportLists]D.?[endif]可以通過Enabled屬性啟動(dòng)或停止定時(shí)器
[if !supportLists]7.?[endif]下列關(guān)于Windows窗體的說法魔吐,錯(cuò)誤的是()扎筒。
[if !supportLists]A.?[endif]Windows窗體也是對(duì)象
[if !supportLists]B.?[endif]窗體類是Form
[if !supportLists]C.?[endif]Windows應(yīng)用程序中只能有一個(gè)窗體
[if !supportLists]D.?[endif]可以通過設(shè)置窗體的屬性,個(gè)性化地展示窗體
[if !supportLists]8.?[endif]引用ListBox(列表框)最后一個(gè)數(shù)據(jù)項(xiàng)應(yīng)使用( ????)語句
A. ListBox1.Items[ListBox1.Items.Count]
B. ListBox1.Items[ListBox1.SelectedIndex]
C. ListBox1.Items[ListBox1.Items.Count-1]??
D. ListBox1.Items[ListBox1.SelectedIndex-1]
[if !supportLists]9.?[endif]如果x=35酬姆, y=100嗜桌,下面代碼的輸出結(jié)果是( ?)。
if (x < 20 || x > 30)
{
???????if (y >= 100)
???????{
??????????????Console.WriteLine("危險(xiǎn) ");
???????}
????????else
???????{
??????????????Console.WriteLine("報(bào)警 ");
????????}
}
else
{
???????Console.WriteLine("安全 ");
}
[if !supportLists]A.?[endif]危險(xiǎn)??B. 報(bào)警 ?C. 報(bào)警 ?安全 ??D. 危險(xiǎn) 安全
[if !supportLists]10.?[endif]在C#中創(chuàng)建類的實(shí)例需要使用的關(guān)鍵字是( )
[if !supportLists]A.?[endif]this B. base C. new? D. as
[if !supportLists]11.?[endif]在SQL Server中辞色,要防止大于100的數(shù)被保存到int類型的列骨宠,可以使用( ?????)。
A. 主鍵約束 ??????B.限制約束 ??????????C. 外鍵約束 ?????? D.檢查約束
[if !supportLists]12.?[endif]在HTML中,下列關(guān)于表單的get和post方法描述錯(cuò)誤的是()
A. post方法更安全
B. get方法只能提交少量數(shù)據(jù)
C. get方法傳遞的數(shù)據(jù)對(duì)客戶端是不可見
D. 表單默認(rèn)為post提交
[if !supportLists]13.?[endif]在css中相满,下列()不是定位頁面元素的方式层亿。
A.left
B.a(chǎn)bsolute?
C.relative
D.fixed
[if !supportLists]14.?[endif]在HTML中,利用( ???)標(biāo)記來構(gòu)建分層
A. <dir> B. <div> C. <dis> D. <dif>
[if !supportLists]15.?[endif]在C#中立美,靜態(tài)變量和實(shí)例變量的區(qū)別有( ???)【選兩項(xiàng)】
A. 靜態(tài)變量就是變量定義后它的值是不能再改變的
B. 靜態(tài)變量的作用就是所有的實(shí)例對(duì)象共用一個(gè)內(nèi)存空間
C. 實(shí)例變量就是只能通過類名訪問的屬性
D. 實(shí)例變量是每創(chuàng)建一個(gè)實(shí)例后該變量都是重新創(chuàng)建的匿又,相互之間沒有關(guān)系
[if !supportLists]16.?[endif]在SQL Server數(shù)據(jù)庫中,有g(shù)oods(商品)表建蹄,包含字段:GID(編號(hào))碌更、Gname(商品名稱)、price(價(jià)格)現(xiàn)查找所有商品中價(jià)格最高的前5件商品信息洞慎,下列SQL語句正確的是( ????)
A. select top 5 from goods order by price desc
B. select top 5 * from goods group by price desc
C. select top 5 * from goods group by price
D. select top 5 * from goods order by price desc
[if !supportLists]17.?[endif]對(duì)于主鍵的說法錯(cuò)誤的是()
A. 主鍵字段輸入的數(shù)據(jù)不允許重復(fù)
B. 主鍵字段的數(shù)據(jù)痛单,一定是自動(dòng)增長數(shù)據(jù)類型,不允許輸入
C. 若主鍵由多個(gè)列組合而成劲腿,則其中某一列可以存在重復(fù)值
D. 主鍵字段可以是字符數(shù)據(jù)類型
[if !supportLists]18.?[endif]下列查詢條件()可以查詢出客戶表中的address包含“武漢”的記錄
A. Where address='%武漢%' B. Where address is '武漢'
C. Where address like '%武漢%' D. Where address like '武漢'
[if !supportLists]19.?[endif]要退出應(yīng)用程序的執(zhí)行旭绒,應(yīng)執(zhí)行下列的()語句。?
A. Application.Exit();? B. Application.Exit;
C. Application.Close(); D. Application.Close;
[if !supportLists]20.?[endif]在ADO.NET中焦人,為訪問DataTable對(duì)象從數(shù)據(jù)源提取的數(shù)據(jù)行,可使用DataTable對(duì)象的( ????)屬性快压。
A. Rows? B. Columns ?? C. Constraints ? D. DataSet
[if !supportLists]21.?[endif]()標(biāo)記用于將文字顯示為粗體字。
??A. <A>
??B. <B>
??C. <U>
??D. <I>
[if !supportLists]22.?[endif]在C#中垃瞧,下列表達(dá)式計(jì)算正確的是( ????)∑汗【選兩項(xiàng)】
A. 10%3=3 ??????? B. 10/3=3?????????? ?C. 10%3=1?? ?D. 10/3=1
[if !supportLists]23.?[endif]在C#中个从,下列代碼運(yùn)行結(jié)果是( ????)。
int[] names = new int[]{4,3,2,1};
Array.Sort(names);
foreach(int name in names)
{
Console.Write(name);
}
A. 4321 ??? ?B. 1234? ??C. 4123 ??? ???D. 3214
[if !supportLists]24.?[endif]在WinForm中歪沃,為了防止用戶無意關(guān)閉窗體嗦锐,需要在( ????)事件中編寫代碼,提示用戶是否關(guān)閉窗體沪曙。
A. FormClosing B. FormClosed ??????? C. Load ??? ??D. VisibleChanged
[if !supportLists]25.?[endif]在ADO.NET中奕污,DataReader對(duì)象用于從數(shù)據(jù)庫中檢索只讀的數(shù)據(jù),假設(shè)存在Command對(duì)象command,則使用以下( ????)語句可以創(chuàng)建一個(gè)DataReader對(duì)象液走。
A. SqlDataReader dtReader=command.ExecuteReader();
B. SqlDataReader dtReader=new SqlDataReader(command.ExecuteReader);
C. SqlDataReader dtReader=ExecuteReader();
D. SqlDataReader dtReader=command.Excute();
[if !supportLists]26.?[endif]在WinForm高級(jí)控件中碳默,使用工具條控件可以創(chuàng)建功能非常強(qiáng)大的工具欄贾陷,工具欄上可以包含以下控件中除了( ????)控件。
A. 按鈕
B. 文本框
C. 標(biāo)簽
D. 計(jì)時(shí)器
[if !supportLists]27.?[endif]()控件組合了TextBox控件和ListBox控件的功能嘱根。
[if !supportLists]A.?[endif]ComboBox????????B. Label ??????????C. ListView ???????D. DomainUpDown
[if !supportLists]28.?[endif]若要使TextBox中的文字不能被修改髓废,應(yīng)對(duì)( ??)屬性進(jìn)行設(shè)置。
[if !supportLists]A.?[endif]Locked ??B. Visible ?C. Enabled ??D. ReadOnly
[if !supportLists]29.?[endif]在C#語言中该抒,下列代碼執(zhí)行后c的值是( ?????)慌洪。
int a = 3; int b = ++a; b++; int c = a + b
[if !supportLists]A.?[endif]6 ??????????????B. 7 ??????????????C. 8 ??????????????D. 9
[if !supportLists]30.?[endif]在CSS中為DIV設(shè)置如下樣式,則該標(biāo)簽的實(shí)際高度為()凑保。
div{height:200px;padding:10 20px;border:1px;}
A.200px
B. 221px
C. 222px
D. 242px
[if !supportLists]31.?[endif]下列選項(xiàng)中冈爹,可以設(shè)置文本在容器中水平居中的CSS樣式是()。
A. text-align:center B. margin:auto 10px
C. margin:10px auto D. vertical-align:middle
[if !supportLists]32.?[endif]下列選項(xiàng)中欧引,可以設(shè)置頁面中某個(gè)DIV標(biāo)簽相對(duì)于頁面水平居中的CSS樣式是
()频伤。
A. padding:0px auto B. text-align:center
C. vertical-align:middle D. margin:0px auto
[if !supportLists]33.?[endif]CSS樣式background-position:10px -10px 代表的意義是()
A.背景圖片向左偏移10px,向下偏移10px
B.背景圖片向左偏移10px,向上偏移10px
C.背景圖片向右偏移10px,向下偏移10px
D.背景圖片向右偏移10px,向上偏移10px
[if !supportLists]34.?[endif]C#語言中,關(guān)于return語句的說法维咸,錯(cuò)誤的是()剂买。A.有返回值的方法中必須要使用return語句
B.如果方法的返回值類型為void,則該方法中不能使用return語句
C.return語句可以結(jié)束方法的調(diào)用
D.return語句只能返回一個(gè)值
[if !supportLists]35.?[endif]有以下C#代碼,int i=1; ?while (i<=5) ?i++; 該語句執(zhí)行后癌蓖,變量i的值是( )?
A.5?????
B.6?
??C.因?yàn)槭撬姥h(huán),所以i的值還是1
D.7?
[if !supportLists]36.?[endif]在WinForm窗體中瞬哼,如果不使用分組控件而直接拖拽2個(gè)單選框,則下列說法正確的是()
A. 兩個(gè)單選按鈕可以同時(shí)被選中租副,即被看作是兩個(gè)單獨(dú)的組
B. 兩個(gè)單選按鈕被自動(dòng)默認(rèn)為一組
C. 運(yùn)行報(bào)錯(cuò)坐慰,提示必須使用分組控件對(duì)單選按鈕進(jìn)行分組
D. 以上都不對(duì)
[if !supportLists]37.?[endif]在WinForm窗體中有一個(gè)年齡文本框 txtAge,下面()代碼可以獲得輸入的年齡用僧。
A. int age = Convert.ToInt32(txtAge); B. int age = int.Parse(txtAge);
C. int age = Convert.ToInt32(txtAge.Text); D. int age = txtAge.Text;
[if !supportLists]38.?[endif]和C#中的所有對(duì)象一樣结胀,窗體也是對(duì)象,是()類的對(duì)象
A.Label
B. Control
C. Window
D.?Form
[if !supportLists]39.?[endif]在HTML表單控件下拉列表中责循,如果要某一項(xiàng)被選中糟港,以下正確的()。
A. <option value="" selected>朱一龍</option>
B. <option value="" checked>張藝興</option>
C. <option value="checked">王源</option>
D. <option value="selected">王俊凱</option>
[if !supportLists]40.?[endif]SQL語言中院仿,條件表示年齡在20至30之間的表達(dá)式為()秸抚。
A. IN (20,30) B. BETWEEN 20 OR 30
C. BETWEEN 20 AND 30 D. IN (20-30)
[if !supportLists]41.?[endif]在WinForm窗體中歹垫,為了禁用一個(gè)名為btnOk的Button控件剥汤,下列做法正確的是()。
A. btnOk.Visible=true
B. btnOk.Enable=true
C. btnOk.Enable=false
D. btnOk.Visible=false
[if !supportLists]42.?[endif]關(guān)于ListView控件objListView,要獲取其選中的?ListViewItem的文本排惨,代碼是()吭敢。
[if !supportLists]A.?[endif]string str = objListView.Text
[if !supportLists]B.?[endif]string str = objListView.Items[0].Text
C. string str = objListView.SelectedItems[0].Text
D. string str = objListView.SelectedItem.Text
[if !supportLists]43.?[endif]ADO.NET由()兩部分組成。
A.?Connection和DataSet B.?.NET Framework數(shù)據(jù)提供程序和DataSetC.?.NET Framework數(shù)據(jù)提供程序和Connection D.?Command和Connectin
[if !supportLists]44.?[endif]HTML中要?jiǎng)?chuàng)建一個(gè)左右框架暮芭,右邊框架寬度是左邊框架的3倍鹿驼,以下語句正確的是()欲低。
A. public void test(string a,string b)
B. <FRAMESET cols="*, 3*">
C. <FRAMESET rows="*, 2*">
D.?<FRAMESET rows="*, 3*">
[if !supportLists]45.?[endif]在C#程序中,下列關(guān)于DataSet的說法錯(cuò)誤的是()蠢沿。
A.可以理解成一個(gè)臨時(shí)的數(shù)據(jù)庫????????
B. 在與數(shù)據(jù)庫斷開連接后伸头,DataSet中的數(shù)據(jù)會(huì)消失
C.在DataSet中可以包含多個(gè)DataTable????????
D.?DataSet實(shí)際上是從數(shù)據(jù)源中檢索到的數(shù)據(jù)在內(nèi)存中的緩存
[if !supportLists]46.?[endif]在.NET的Windows應(yīng)用程序中,關(guān)于MDI窗體說法錯(cuò)誤的是()舷蟀。
A. 每個(gè)MDI應(yīng)用程序只能有一個(gè)父窗體
B. 關(guān)閉MDI父窗體時(shí)自動(dòng)關(guān)閉所有打開的MDI子窗體
C. 啟動(dòng)一個(gè)MDI應(yīng)用程序時(shí)恤磷,首先啟動(dòng)MDI子窗體
D. 可以同時(shí)打開多個(gè)子窗體
[if !supportLists]47.?[endif]C#中如果想將4個(gè)數(shù)按冒泡排序升序排列,則需要比較()次
A. 6 ? B. 8
C. 10 D. 12
[if !supportLists]48.?[endif]關(guān)于C#語言中的switch case語句野宜,下列說法正確的是()扫步。
A.switch判斷的表達(dá)式可以是整型或字符型,但不能是字符串型
B. 在該語句中匈子,最多不能超過五個(gè)case子句
C. 在該語句中河胎,只能有一個(gè)default子句
D. 在該語句中,只能有一個(gè)break語句
[if !supportLists]49.?[endif]在WinForm程序中可以通過( ???)控件來實(shí)現(xiàn)以下的界面示例
A虎敦、工具欄
B游岳、狀態(tài)欄
C、菜單欄
D其徙、文本框
[if !supportLists]50.?[endif]在ADO.NET中胚迫,下列代碼運(yùn)行時(shí)將出現(xiàn)異常的是()。
SqlDataReader reader=sqlCmd.ExecuteReader();//1
reader.Read(); ?//2
reader.Close(); ?//3
reader.Read(); ?//4
A唾那、1
B访锻、2
C、3
D闹获、4