COREPOWER YOGA C1 CLASS EXAM NEWEST 2024
COMPLETE 180 QUESTIONS AND CORRECT
DETAILED ANSWERS (VERIFIED ANSWERS)
|ALREADY GRADED A+||BRAND NEW VERSION!!
Which of the following is a reserved keyword?
A. program
B. System
C. decimal
D. Console - ans -C. decimal
In order to place a value in memory that cannot be changed, you would ____.
A. declare the variable and do a compile-time initialization.
B. add the keyword unchangeable to the declaration.
C. add the keyword const to a declaration.
D. not be able to use C#.
- ans -C. add the keyword const to a declaration.
Which statement subtracts 100 from the original value of an answer?
A. 100 -= answer;
B. answer = 100 -;
C. answer =- 100;
D. answer -= 100;
- ans -D. answer -=100;
What is stored in ans as a result of the arithmetic expression, given the following
declarations?
int ans = 5, v1 = 2, v2 = 10, v3 = 18;
ans += v1 + 10 * (v2-- / 5) + v3 / v2;
A. 27
B. 12
C. 29
D. none of the above - ans -C. 29
Programmers follow the rules for constructing identifiers for naming all of the
following items EXECPT _____.
,A. keywords
B. data items
C. classes
D. namespaces - ans -A. keywords
Which of the following is a contextual keyword in C#?
A. yield
B. bool
C. const
D. Write - ans -A. yield
One converntion used for naming identifiers is called Pascal case. This convention
requires that _____.
A. the first letter be lowercase with the first letter of each subsequent word
capitalized.
B. all letters appear in uppercase characters
C. the first letter be uppercase with the first letter of each subsequent word
capitalized.
D. all letters appear in lowercase with words separated by an underscore.
- ans -C. the first letter be uppercase with the first letter of each subsequent word
capitalized.
When you declare a variable in C#, the computer ___.
A. displays the contents of the memory location.
B. sets aside a location in memory to store the value.
C. does a compile-time initialization of the memory location.
D. stores a value in the memory location.
- ans -B. sets aside a location in memory to store the value.
Which of the following is a valid compile-time initialization for amoundDue, a
variable of the decimal type, that will initially be set to zero?
A. amountDue = 0;
B. amountDue = '0';
C. amountDue = 0m;
D. amountDue = 0d;
- ans -C. amountDue = 0m;
,An instance of a class is called a(n) __________.
A. instantiation
B. objects
C. template
D. type - ans -B. objects
A class is used in C# to represent the encapsulation of ___________.
A. data and behaviors
B. packages
C. types and objects
D. integers and floating point values
- ans -A. data and behaviors
Which of the following would be the best declaration and compile-time
initialization for an identifier to store the cost of tuition this year, if the value is
$10,000?
A. decimal tuitionCost = $10,000.00;
B. decimal tuitionCost = 10000.00m;
C. decimal tuitionCost = 10,000.00;
D. decimal tuitionCost = "$10,000.00";
- ans -B. decimal tuitionCost = 10000.00m;
A standard convention used by programmers for naming constants is to
_________.
A. use camel case
B. begin the first character with a lower case characters and use upper case for
the rest of the identifier
C. use uppercase letters for the identifier
D. use Pascal case
- ans -C. use uppercase letters for the identifier
The assignment operator used in C# is ______.
A. =
B. assign
C. const
D. store
- ans -A. =
, The result of the following expression is ______.
double ans, v1 = 45.7, v2 = 10.5;
int v3 = 5;
ans = (int) v1 + v2 / (double) v3;
A. 48.8
B. 47.1
C. 48
D. 47 - ans -B. 47.1
If you expect to receive an "A" in this course, which of the following declarations
would be most appropriate for storing the grade?
A. char letterGrade;
B. string grade;
C. int letterGrade;
D. double letterGrade;
- ans -A. char letterGrade
Following standard conventions used by many programmers, the identifier
REBATE would be defined as a(n) ________.
A. class
B. object
C. namespace
D. constant - ans -D. constant
A computer that has 8 GB of RAM can store approximately eight ________
characters.
A. million
B. trillion
C. gillion
D. billion - ans -D. billion
Console applications require a Main() method, unlike Windows applications that
do not require a Main() method. - ans -False
The definition of the method includes the entry inside the curly braces, which is
sometimes called the body of the method. - ans -False
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Essiekarimi. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $11.49. You're not tied to anything after your purchase.