1. Trang chủ
  2. » Công Nghệ Thông Tin

Quiz1 basic c programming techniques

37 697 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Cấu trúc

  • Question 1 of 20

  • Question 2 of 20

  • Question 3 of 20

  • Question 4 of 20

  • Question 5 of 20

  • Question 6 of 20

  • Question 7 of 20

  • Question 8 of 20

  • Question 9 of 20

  • Question 10 of 20

  • Question 11 of 20

  • Question 12 of 20

  • Question 13 of 20

  • Question 14 of 20

  • Question 15 of 20

  • Question 16 of 20

  • Question 17 of 20

  • Question 18 of 20

  • Question 19 of 20

  • Question 20 of 20

  • Question 1 of 20

  • Question 2 of 20

  • Question 3 of 20

  • Question 4 of 20

  • Question 5 of 20

  • Question 6 of 20

  • Question 7 of 20

  • Question 8 of 20

  • Question 9 of 20

  • Question 10 of 20

  • Question 11 of 20

  • Question 12 of 20

  • Question 13 of 20

  • Question 14 of 20

  • Question 15 of 20

  • Question 16 of 20

  • Question 17 of 20

  • Question 18 of 20

  • Question 19 of 20

  • Question 20 of 20

  • Question 1 of 20

  • Question 2 of 20

  • Question 3 of 20

  • Question 4 of 20

  • Question 5 of 20

  • Question 6 of 20

  • Question 7 of 20

  • Question 8 of 20

  • Question 9 of 20

  • Question 10 of 20

  • Question 11 of 20

  • Question 12 of 20

  • Question 13 of 20

  • Question 14 of 20

  • Question 15 of 20

  • Question 16 of 20

  • Question 17 of 20

  • Question 18 of 20

  • Question 19 of 20

  • Question 20 of 20

Nội dung

Part 1 of 1 80.0 100.0 Points Question 1 of 20 5.0 5.0 Points int type variable range is A. 32768 +32767 B. MIN_SIZE to MAX_SIZE C. 2147483648 +2147483647 D. 8388608 +8388607 Question 2 of 20 5.0 5.0 Points byte type variable size is A. 16 bits B. 12 bits C. 8 bits D. 24 bits Question 3 of 20 5.0 5.0 Points double type variable precision is A. 1516 digits B. 1617 digits C. 1213 digits D. 1415 digits Question 4 of 20 5.0 5.0 Points float type variable precision is A. 6 digits B. 8 digits C. 9 digits D. 7 digits Question 5 of 20 0.0 5.0 Points how many number is created while compilation with the declaration below: short s = 1; A. 2 B. 3 C. 1 D. 4 Question 6 of 20 5.0 5.0 Points The syntax for declaring array is: A. arrayname DataType; B. DataType arrayname; C. DataType arrayname; D. arrayname DataType;

Part of - Question of 20 80.0/ 100.0 Points 5.0/ 5.0 Points int type variable range is A -32768 +32767 B MIN_SIZE to MAX_SIZE C -2147483648 +2147483647 D -8388608 +8388607 Question of 20 byte type variable size is A 16 bits B 12 bits 5.0/ 5.0 Points C bits D 24 bits Question of 20 5.0/ 5.0 Points double type variable precision is A 15-16 digits B 16-17 digits C 12-13 digits D 14-15 digits Question of 20 float type variable precision is 5.0/ 5.0 Points A digits B digits C digits D digits Question of 20 how many number is created while compilation with the declaration below: short s = 1; A B C D 0.0/ 5.0 Points Question of 20 5.0/ 5.0 Points The syntax for declaring array is: A arrayname DataType[]; B DataType[] arrayname; C DataType arrayname[]; D arrayname[] DataType; Question of 20 decimal type variable precision is A 23-24 B 28-29 C 20-21 5.0/ 5.0 Points D 26-27 Question of 20 5.0/ 5.0 Points LINQ can access to A.MS ACCESS B.Collection C.XML data D.SQL SERVER Question of 20 A variable declared inside a method is called a variable A Private 5.0/ 5.0 Points B Serial C Local D Static Question 10 of 20 5.0/ 5.0 Points In the following code sample, will the second if structure be evaluated? bool condition = true; if(condition) if(5 < 10) Console.WriteLine("5 is less than 10); True False Question 11 of 20 The _ namespace provides the classes and methods for manipulating arrays A Array 5.0/ 5.0 Points B System.Arr C System.IO D System.Array Question 12 of 20 5.0/ 5.0 Points How many times will this loop execute? int value = 0; { Console.WriteLine (value); } while value > 10; A times B 10 times C time D times Question 13 of 20 0.0/ 5.0 Points long type variable size is A 32 bits B 48 bits C 64 bits Question 14 of 20 5.0/ 5.0 Points Concatenating with strings are done with: A method calls B operator overloading C reserved words D operator overloading and method calls Question 15 of 20 0.0/ 5.0 Points character type variable size is A bits B bits C bits D 16 bits Question 16 of 20 What are the keywords supported in an if statement? A if, else, else-if, return B if, else, else if C if, else, default 0.0/ 5.0 Points D if, else, else if, break Question 17 of 20 5.0/ 5.0 Points The namespace contains all code required to interact with the including the console output A IO B System C Class D Namespace Question 18 of 20 C# is not used for A Data services B Kernel service 5.0/ 5.0 Points C contains numbers rather than letters D sequence of characters in double quotation marks Question 19 of 20 class Test{ static void Main() { int[] Array1= {3,2,1}; int i=Array.IndexOf(Array1,3); Console.WriteLine(i); } } What will be the output of above code A B C D 5.0/ 5.0 Points Question 20 of 20 0.0/ 5.0 Points how many number is created while compilation with the declaration below: short s = 1; A B C D Part of - Question of 20 61.67/ 100.0 Points 5.0/ 5.0 Points If you want to iterate over the values in an array of integers called arrNumbersto perform an action on them, which loop statement enables you to this? A foreach (number in arrNumbers) { } B foreach (int number in arrNumbers) { } C for (int i; each i in arrNumbers; i++) { } D for each (int number in arrNumbers) { } Question of 20 0.0/ 5.0 Points The default integral number type is A short B int C byte D long Question of 20 5.0/ 5.0 Points A String literal is a: A only contains one character B contains exactly its variable name and nothing else C contains numbers rather than letters D sequence of characters in double quotation marks Question of 20 how many number is created while compilation with the declaration below: byte b = -1; A B 5.0/ 5.0 Points C D compile error Question of 20 5.0/ 5.0 Points In the following code sample, will the second if structure be evaluated? bool condition = true; if(condition) if(5 < 10) Console.WriteLine("5 is less than 10); True False Question of 20 double type variable precision is A 15-16 digits B 16-17 digits 5.0/ 5.0 Points C 12-13 digits D 14-15 digits Question of 20 0.0/ 5.0 Points To create a string literal exclude escape sequence, use: A #string B @string C $string D !string Question of 20 C# is not used for 5.0/ 5.0 Points A Data services B Kernel service C Virus D User services Question of 20 double type variable range is A from ±5.0E−256 to ±1.7E320 B from ±5.0E−324 to ±1.7E308 C from ±1.7E−320 to ±1.7E320 D about ±1.5.0E±256 0.0/ 5.0 Points Question 10 of 20 5.0/ 5.0 Points namespace College.Library { namespace Shelf { class Book{ } } } The fully qualified name of class Book is A College.Library.Shelf.Book() B Shelf.Book() C Library.Shelf.Book() D College.Library.Book() Question 11 of 20 What code would we need to implement to have an integer “cast” to a string? A public static implicit operator String(int i) 0.0/ 5.0 Points { return i.ToString(); } B public static explicit operator String(int i) { return i.ToString(); } C public static operator String(int i) { return i.ToString(); } D None of the above Question 12 of 20 What can be impossible in C# ? A Creation of an ArrayList B Creation of a two dimensional array 5.0/ 5.0 Points C Creation of a non-zero based array D Creation of a Dictionary Question 13 of 20 0.0/ 5.0 Points how many number is created while compilation with the declaration below: short s = 1; A B C D Question 14 of 20 implicite integral number initialization casting order is 0.0/ 5.0 Points A uint int ulong long B int long uint ulong C int uint long ulong D ulong long uint int Question 15 of 20 decimal type variable size is A 48 bits B 96 bits C 64 bits D 128 bits 5.0/ 5.0 Points Question 16 of 20 1.67/ 5.0 Points LINQ can access to A.MS ACCESS B.Collection C.XML data D.SQL SERVER Question 17 of 20 For multiple levels of organizations _ can be used A a namespace B a nested namespaces 0.0/ 5.0 Points C Classes D System namespace Question 18 of 20 5.0/ 5.0 Points If an IndexofAny method is passed an array of characters it: A searches for the first occurrence of any of the characters in the string B will search for the first occurrence of the sequence of characters C generates an error D finds the first occurrence of each letter in the string Question 19 of 20 int type variable range is 5.0/ 5.0 Points A -32768 +32767 B MIN_SIZE to MAX_SIZE C -2147483648 +2147483647 D -8388608 +8388607 Question 20 of 20 What output does the code below generate when compiled/run? class Test { public static void Print(object[] arr){ foreach(object p in arr) System.Console.WriteLine(p); } public static void Main(){ string s=""Programming in c#""; char[] separator={' '}; string[] words=s.Split(separator); 10 Print(words); 11 } } A The code will generate an error at compile time at line as the function Split used is not supported string data type 5.0/ 5.0 Points B The code will generate an error at line 10 as conversion not allowed for one array type to another array type C The code will compile successfully and output will be Programming In c# ... name of class MyClass is A Space1.Space2.MyClass() B Space2.MyClass() C Space2.Space1.MyClass() D Space1.MyClass() Question of 20 0.0/ 5.0 Points For multiple levels of organizations _ can be... LINQ can access to A.MS ACCESS B.Collection C. XML data D.SQL SERVER Question of 20 A variable declared inside a method is called a variable A Private 5.0/ 5.0 Points B Serial C Local D Static... namespace contains all code required to interact with the including the console output A IO B System C Class D Namespace Question 18 of 20 C# is not used for A Data services B Kernel service 5.0/

Ngày đăng: 31/03/2017, 15:04

TỪ KHÓA LIÊN QUAN

TÀI LIỆU CÙNG NGƯỜI DÙNG

TÀI LIỆU LIÊN QUAN

w