0% found this document useful (0 votes)
10 views

QUIZ VISUAL C (TEST EXAM)

Uploaded by

cumarkaan21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

QUIZ VISUAL C (TEST EXAM)

Uploaded by

cumarkaan21
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Subject: C#

MULTIPLE CHOICES

1. A (n) is a set of instructions that a computer follows to perform a task.


a. compiler
b. program
c. interpreter
d. programming language
2. The physical devices that a computer is made of are referred to as .
a. hardware
b. software
c. the operating system
d. tools
3. The part of a computer that runs programs is called .
a. RAM
b. secondary storage
c. main memory
d. the CPU
4. Computers can execute only programs that are written in .
a. C#
b. assembly language
c. machine language
d. Java
5. The translates an assembly language program to a machine language
program.
a. assembler
b. compiler
c. translator
d. interpreter
6. The rules that must be followed when writing a program are called .
a. syntax
b. punctuation
c. keywords
d. operators
7. A(n) is a set of well-defined logical steps that must be taken to perform a
task.
a. logarithm
b. plan of action
c. logic schedule
d. algorithm
8. A is code that describes a particular type of object.
a. namespace
b. blueprint
c. schema
d. class
9. A namespace is container that holds .
a. methods
b. names
c. spaces
d. classes
10. A(n) marks the end of a programming statement in C#.
a. semicolon
b. period
c. hyphen
d. underscore
11. A piece of data that is written into a program’s code is a(n) .
a. identifier
b. specifier
c. keyword
d. literal
12. The property allows you to set the font, font style, and size of the
control’s text.
a. Style
b. AutoSize
c. Text
d. Font
13. To close an application’s form in code, you use the statement _ .
a. Close();
b. Close.This();
c. Close()
d. this.Close();
14. A is a storage location in memory that is represented by a name.
a. mnemonic
b. data type
c. namespace
d. variable
15. A variable’s indicates the type of data that the variable will hold.
a. name
b. data type
a. scope
b. value
16. Fundamental types of data, such as strings, integers, and real numbers, are known as
.
a. primitive data types
b. fundamental variables
c. logical digits
d. literal data types
17. A common operation performed on strings is , or appending one string to
the end of another string.
a. addition
b. merging
c. concatenation
d. tying
18. A belongs to the method in which it is declared, and only statements
inside that method can access the variable.
a. method variable
b. primitive variable
c. temporary variable
d. local variable
19. A(n) is a piece of data that is passed into a method.
a. variable
b. argument
c. string
d. literal
20. A is a variable that is declared inside a class but not inside any method.
a. term
b. class variable
c. field
d. mnemonic
21. A(n) specifies how a class member can be accessed by code outside the
class.
a. namespace
b. access modifier
c. scope delimiter
d. class directive
22. A is a field that cannot be changed by any statement in the class.
a. static field
b. class name
c. key field
d. constant field
23. A structure executes a set of statements only under certain
circumstances.
a. sequence
b. circumstantial
c. decision
d. Boolean
24. A structure provides one alternative path of execution.
a. sequence
b. single-alternative decision
c. one-path alternative
d. single-execution decision
25. A(n) expression has a value of either true or false.
a. binary
b. decision
c. unconditional
d. Boolean
26. The symbols > , < , and == are all operators.
a. relational
b. logical
c. conditional
d. ternary
27. You use a(n) statement to write a single-alternative decision structure.
a. test-jump
b. if
c. if-else
d. if-call
28. You use a (n) statement to write a dual alternative decision structure.
a. test-jump
b. if
c. if-else
d. if-call
29. A decision structure is written inside another decision structure.
a. nested
b. tiered
c. dislodged
d. hierarchical
30. && , || , and ! are operators.
a. relational
b. logical
c. conditional
d. ternary
31. The family of methods can be used to convert a string to a specific data
type without throwing an exception.
a. TryConvert
b. Parse
c. TryParse
d. SafeConvert
32. You use the statement to create a multiple alternative decision structure.
a. menu
b. branch
c. select
d. switch
33. The section of a switch statement is branched to if none of the case
values match the test expression.
a. else
b. default
c. case
d. otherwise
34. A ListBox’s index numbering starts at .
a. 0
b. 1
c. −1
d. any value you specify
35. You can use the property to determine whether an item is selected in a
ListBox.
a. Index
b. SelectedItem
c. SelectedIndex
d. Items.SelectedIndex
SHORT ANSWER

1. In the Toolbox, in which group is the Textbox tool located?


• Answer: The TextBox tool is located in the Common Controls group.
2. What two things does a variable declaration specify about a variable?
• Answer: A variable declaration specifies the variable’s name and data type.

3. Give an example of a programming statement that uses string concatenation.


• Answer: string fullName = "Ali" + " " + "Axmed";
4. What is the term used for a number that is written into a program’s code?
• Answer: The term is literal.
5. Write a programming statement that assigns an integer literal to a variable.
• Answer: Int number = 10;
// 10 is the integer literal assigned to the variable ‘number’
6. What are the values on the right and left of an operator called?
• Answer: The values on the right and left of an operator are called operands.
7. What are the short words that are used in assembly language called?
• Answer: The short words used in assembly language are called mnemonics.
8. What is the difference between a compiler and an interpreter?
• Answer:
A compiler: translates the entire source code of a program into machine code
(or intermediate code) at once, creating a separate executable file.
An interpreter: translates and executes the source code line by line at
runtime, without creating a separate executable file

9. What type of software controls the internal operations of the computer’s hardware?
• Answer: The Operating System (OS).
10. What statement would you write to display Good Afternoon in a message box?
• Answer: MessageBox.Show(“Good Afternoon”);
11. What statement would you write to display your name in a message box?
• Answer: MessageBox.Show(“Your Name”);
// Replace “Your Name” with your actual name.
12. Briefly describe how the AND operator works.
• Answer:
Int age = 25;
Bool hasID = true;

If (age >= 18 && hasID)


{
Console.WriteLine(“You are allowed to enter.”);
}
Else
{
Console.WriteLine(“You are not allowed to enter.”);
}
13. Briefly describe how the OR operator works.
• Answer:
Int age = 25;
Bool hasID = true;

If (age >= 18 || hasID)


{
Console.WriteLine(“You are allowed to enter.”);
}
Else
{
Console.WriteLine(“You are not allowed to enter.”);
}
14. What are the three basic methods of control used in designing structured algorithms?
• Answer: The three methods are sequence, selection (decision), and iteration
(looping).
15. Define the following:
a. An algorithm: is a set of well-defined, logical steps that must be taken to perform a
task.
b. Pseudocode: An algorithm that is written out in plain English is called pseudocode
c. Flowchart: a diagram that graphically depicts the steps of an algorithm

Prepared By Mohamed Abdinasir Hussein


END QUIZ

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy