Assessment 4 Replacing AssNo 1
Open course index
Open block drawer
Started on Wednesday, 3 April 2024, 10:02 PM
State Finished
Completed on Thursday, 4 April 2024, 8:36 AM
Time taken 10 hours 33 mins
Marks 42.00/56.00
Grade 75.00 out of 100.00
Question 1
Incorrect
Mark 0.00 out of 1.00
Flag question
Question text
Which of the following is a valid variable name?
a.
3com
b.
three_com
c.
3_com
d.
ampersand&
Feedback
Your answer is incorrect.
The correct answer is:
three_com
Question 2
Correct
Mark 1.00 out of 1.00
Flag question
, Question text
Which of the following statements is NOT legal?
a.
char ch = 'b';
b.
char ch = '0';
c.
char ch = 65;
d.
char ch = "cc";
Feedback
Your answer is correct.
The correct answer is:
char ch = "cc";
Question 3
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the value of x after the following statements?
float x;
x = 15/4;
a.
3.75
b.
4.0
c.
3.0
d.
60
Feedback
Your answer is correct.
The correct answer is:
3.0
, Question 4
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the value of x after the following statements?
int x;
x = 15/4;
a.
15
b.
3
c.
4
d.
3.75
Feedback
Your answer is correct.
The correct answer is:
3
Question 5
Correct
Mark 1.00 out of 1.00
Flag question
Question text
What is the value of x after the following statements?
int x;
x = 15 % 4;
a.
15
b.
4
c.
3
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 distinctiongateway. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $2.82. You're not tied to anything after your purchase.