Docsity

Reviewer in Computer Programming, Exams of Advanced Computer Programming

Toggle sidebar
bg1
Reviewer
I- Multiple Choice
1. _______ can be used to explain C# code, and to make it more readable. It can also be used to
prevent execution when testing alternative code.
A. Output B. Comment
C. Data D. Variable
2. Single-line comments start with ___ forward slashes.
A. One B. Two
C. Three D. Four
3. _____ are containers for storing data values.
A. Output B. Comment
C. Data D. Variable
4. What variable type storing texts?
A. int B. char
C. bool D. string
5. What variable type storing whole number?
A. int B. char
C. bool D. string
6. What is the correct way to declare variable?
A. int Hatdog = cheese; B. int 23 = number;
C. string Hi = “Ali”; D. string 06 = birthday;
7. To output values or print text in C#, you can use the8_____8method:
A. Console.Readkey(); B. Console.Write()
C. Console.Writeline(); D. Console.WriteLine();
8. use8______8to get user input.
A. Console.ReadKey(); B. Console.Readline();
C. Console.ReadLine(); D. Console.WriteLine();
9. Which is NOT belong to operators?
A. * B. /
C. % D. $
10. What is the function of “%”?
A. Returns the division remainder B. Get the quotient
pf3
pf4

Partial preview of the text

Download Reviewer in Computer Programming and more Exams Advanced Computer Programming in PDF only on Docsity!

Reviewer

I- Multiple Choice

  1. _______ can be used to explain C# code, and to make it more readable. It can also be used to prevent execution when testing alternative code. A. Output B. Comment C. Data D. Variable
  2. Single-line comments start with ___ forward slashes. A. One B. Two C. Three D. Four
  3. _____ are containers for storing data values. A. Output B. Comment C. Data D. Variable
  4. What variable type storing texts? A. int B. char C. bool D. string
  5. What variable type storing whole number? A. int B. char C. bool D. string
  6. What is the correct way to declare variable? A. int Hatdog = cheese; B. int 23 = number; C. string Hi = “Ali”; D. string 06 = birthday;
  7. To output values or print text in C#, you can use the _____ method: A. Console.Readkey(); B. Console.Write() C. Console.Writeline(); D. Console.WriteLine();
  8. use ______ to get user input. A. Console.ReadKey(); B. Console.Readline(); C. Console.ReadLine(); D. Console.WriteLine();
  9. Which is NOT belong to operators? A. * B. / C. % D. $
  10. What is the function of “%”? A. Returns the division remainder B. Get the quotient

C. Get the percentage D. Return the value of quotient

  1. Which is not a comparison operator? A. == B. <= C. < D. =!
  2. Which is not a logical operator? A. || B. && C. != D.!
  3. Use ___ to specify a block of code to be executed, if a specified condition is true A. if B. else C. else if D. switch
  4. Use ____ to specify a block of code to be executed, if the same condition is false A. if B. else C. else if D. switch
  5. Use ___ to specify a new condition to test, if the first condition is false A. if B. else C. else if D. switch
  6. Use _____ to specify many alternative blocks of code to be executed A. if B. else C. else if D. switch
  7. ____ can execute a block of code as long as a specified condition is reached. A. loop B. if C. switch D. Array
  8. ____ are used to store multiple values in a single variable, instead of declaring separate variables for each value. A. loop B. if C. switch D. Array
  9. loop always have ____ to add or subtract the value of declared integer inside. A. Increment B. Bracket C. Statement D. Print
  10. Arrays have ___ ____ to know how many elements/values inside the variable A. Square Bracket B. Bracket C. Increment D. Solid Bracket

III- Fill in the blank

  1. Console.Write_ine();
  2. int __ num = new int __;
  3. string name = jaydee _
  4. int x = 6_ y = 5_ z = 4;
  5. int x = Convert.To_nt32(Console.Read_ine());
  6. if (x < y) _ Console.Write(x); _
  7. string [] name = new string[3] _ “jay”, “jaydee”, “jayjay”_ ;
  8. for (int i = 0; i<5; _++)
  9. int x=0; while (x<8) { Console.WriteLine(“x”); ___; }
  10. _____ x = 5.68;