100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
CSIT Final UPDATED Actual Exam Questions and CORRECT Answers $9.99   Add to cart

Exam (elaborations)

CSIT Final UPDATED Actual Exam Questions and CORRECT Answers

 5 views  0 purchase
  • Course
  • CSIT
  • Institution
  • CSIT

CSIT Final UPDATED Actual Exam Questions and CORRECT Answers Which of the following IS NOT a valid relational operator in Java? a. <= b. > c. == d. <> e. != - CORRECT ANSWER- <> A _____________ loop always executes its loop body at least once

Preview 4 out of 34  pages

  • September 21, 2024
  • 34
  • 2024/2025
  • Exam (elaborations)
  • Questions & answers
  • CSIT
  • CSIT
avatar-seller
MGRADES
CSIT Final UPDATED Actual Exam
Questions and CORRECT Answers
Which of the following IS NOT a valid relational operator in Java?


a. <=
b. >
c. ==
d. <>

e. != - CORRECT ANSWER✔✔- <>


A _____________ loop always executes its loop body at least once.


a. do
b. while
c. repeat
d. for

e. There are no loop structures with this property in Java. - CORRECT ANSWER✔✔- do


Suppose we want to condition an if statement on whether two String objects, referenced by
stringOne and stringTwo, are the same. Which of the following is the correct way to achieve
this?


a. if(stringOne == stringTwo)
b. if(stringOne.compareTo(stringTwo))
c. if(stringOne.equals(stringTwo))
d. if(stringOne != stringTwo)

e. if(stringOne = stringTwo) - CORRECT ANSWER✔✔- c. if(stringOne.equals(stringTwo))


Which of the following for loop headers will cause the body of the loop to be executed 10
times?

,a. for(int i = 0; i <= 10; i++)
b. for(int i = 0; i < 10; i++)
c. for(int i = 1; i <= 11; i++)
d. for(int i = 1; i < 10; i++)

e. None of these for loops will execute the loop body 10 times. - CORRECT ANSWER✔✔-
for(int i = 0; i < 10; i++)


Which boolean operation is described by the following table?


A - B - Operation
True - True - True
True - False - True
False - True - True
False - False - False


a. and
b. not
c. or

d. none of the above - CORRECT ANSWER✔✔- or


Which boolean operation is desrcibed by the following table?


A - B - Operation
True - True - True
True - False - False
False - True - False
False - False - False


a. and
b. not

,c. or

d. none of the above - CORRECT ANSWER✔✔- and


Which of the following boolean expressions tests to see if x is between 2 and 15 (including 2
and 15)?


a. (x <= 15 || x >= 2)
b. (2 <= x || x <= 15)
c. (x >= 2 && x <= 15)

d. (2 <= x <= 15) - CORRECT ANSWER✔✔- (x >= 2 && x <= 15)


What is the value of i after the following code fragment?


int i = 5;


switch(i)


{
case 0:i = 15;break;


case 1:i = 25;break;


case 2:i = 35;break;


case 3:i = 40;break;


default:i = 0;
}


a. 0
b. 15

, c. 35
d. 40

e. 25 - CORRECT ANSWER✔✔- 0


Given the following code, what is the final value of i?


int i;


for(i = 0; i <= 4;i ++ )


{
System.out.println(i);
}


a. 3
b. 4

c. 5 - CORRECT ANSWER✔✔- 5


Which of the following are valid case statements in a switch?


a. case 'ab':
b. case 1.5:
c. case 1:

d. case x < 4; - CORRECT ANSWER✔✔- case 1:


Given the following code fragment, and an input value of 5, what is the output?


int x;


if( x < 3)

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

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

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

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 MGRADES. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $9.99. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

79223 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$9.99
  • (0)
  Add to cart