Warm-up Exercises
Questions
-
Give two examples of instant messaging applications.
-
How many bits are in one byte?
-
Why are “ancient” programming languages like COBOL and FORTRAN still in use?
#: The least significant (rightmost) bit of even numbers in binary representation is 1. ________
#: Commands for managing the IDE and for developing, maintaining and executing programs are contained in the menus, which are located on the menu bar. ________
#: Is the following statement true: 010000 < 001111? ________
#: You can browse the web from within the Visual Studio Community environment. ________
#: Visual Studio Enterprise can be used to create apps only in C#. ________
#: High-level computer languages are easily understood by a computer without any need of translation. ________
#: An assembler converts assembly language programs into machine language. ________
#: Is the role of CPU to govern computing devices and processes? ________
#: Was Windows system developed in sixties? ________
#: Do console applications provide visual environment? ________
- Computers process data, using sets of instructions called …
- specifications
- computer programs
- recipes
- hardware
- ______ Law states that every year or two, the computing power of computers doubles without any increase in price.
- Gate’s
- Moore’s
- Henderson’s
- None of the above.
- The main purpose of the AUL unit is: ______.
- to store permanent data
- to store temporary data
- to cool the computer down and prevent overheating
- to perform calculations and logical comparisons for the computer
- Binary code is: ______.
- a complex, but easy to use, modern programming language
- a series of 0s and 1s
- high-level machine language instructions
- a series of characters representing the numbers 0 to 9
- The order of simplicity (easiest to hardest) to a human of the three basic types of languages is: ______.
- high-level, assembly, machine
- assembly, machine, high-level
- machine, high-level, assembly
- machine, assembly, high-level
- Which of the following is true: C# ______.
- is object oriented
- contains a powerful class library
- is not limited to web-based applications
- all of the above
- Visual C# programs are created using Microsoft’s Visual Studio–a collection of software tools called a(n) ______.
- operating system
- Integrated Programming Environment
- Integrated Development Environment
- Class Library
- The purpose of the Visual Studio Enterprise is to ______.
- create a program
- run a program
- debug a program
- all of the above
- This menu contains commands for opening projects, closing projects, printing project data, etc.
- View menu
- Edit menu
- Tools menu
- File menu
- A single line comment in C# begins with which double symbol?
-
**
-
//
-
##
-
$$
- Which method is the starting point of any C# program?
- Open
- Main
- Start
- none of these.
- All statements in C# end with:
- semicolon
- colon
- comma
- full stop
- Violations of language rules are referred to as:
- semantic errors
- syntax errors
- run-time errors
- none of these
- What operator is used to denote remainder (modulo) operation?
-
&
-
%
-
#
-
@
- Which of the following is in highest-to-lowest order of operator precedence?
- multiplication, division, parentheses
- addition, subtraction, division
- parentheses, multiplication, addition
- none of these
- In C# code:
Console.WriteLine($"Initial value is: {myAccount.GetNumber()}");
which method is called (executed) first?
- WriteLine()
- GetNumber()
- they are called at the same time
- none of these
- Which of these are binary operators?
- / (division)
- * (multiplication)
- + (addition)
- all of these
- You can declare the same variable twice in a C# code.
- Yes
- No
- It is good to initialize all variables upon their creation (declaration).
- Yes
- No
- Is = the equality operator in C#?
- Yes
- No
- Visual C# programs are created using Microsoft’s Visual Studio—a collection of software tools called a(n) _____.
- Operating system
- Integrated Programming Environment
- Integrated Development Environment
- Class Library.
- The starting point of a C# application is the
- Main
- Start
- Open
- None of the above.
- C# statements in C# usually end with:
-
:
-
;
-
#
-
.
- _____ are violations of language rules.
- Logic errors
- Syntax errors
- Run-time errors
- None of the above.
- A variable is:
- An instruction for the compiler
- A location in memory where a value is stored
- A description of a method call (including the argument list)
- None of the above.
- What is an algorithm?
- The actions (and their order) that solve a particular problem
- An English description of a problem to be solved
- The declaration of an object.
- None of the above.
- The order of simplicity (easiest to hardest) to a human of the three basic types of languages is:
- High-level, machine, assembly
- Machine, high-level, assembly
- Assembly, machine, high-level
- High-level, assembly, machine.
- Which of these are binary operators?
- * (multiplication)
- + (addition/concatenation)
- / (division)
- All of these.
- What is the correct order of actions in developing software?
- Define the problem, develop an algorithm, code a C# program, run tests
- Code a C# program, develop an algorithm, run tests
- Code a C# program, run tests, develop an algorithm.
- Define the problem, run tests, code a C# program.
- What is the resulting value of c at the end of the following code segment?
- 25
- 15
- 20
- None of the above
- What value will be printed on the output:
- 1
- 5.33
- -1
- 5
- Some compilers will automatically remove body statements from loops that do not need to be executed multiple times through a process known as _____.
- Classification
- Optimization
- Interpretation
- None of the above.
Problems
- Find 3 syntax errors in this short C# code.
-
What sequence will appear on the output of this C# code? Which parameter of
SD(int[] A, int B)
method is passed by value? -
Consider the following code:
- How many times does the outer loop iterate (i.e., how many scenes are shot)?
- How many times does the inner loop iterates (i.e., how many takes for each scene)?
- Finally, what is the total number of iteration of the nested loops (i.e., how many takes are made, total)?
-
Mark the pretest loops:
- do while
- switch
- while
- for
- if-else-if
-
Which of the following correctly declares and creates a two-dimensional rectangular array of integers?
- int[,] sum = new int[10, 40];
- int[][] sum = new int[25, 43];
- int sum[] = new int[20, 20];
- None of the above.
-
C# supports two types of two-dimensional arrays:
- quadrilateral and isosceles
- jagged and rectangular
- jagged and round
- None of the above.