Question
4. Which of the following code segments correctly swaps the values of variables named x and y? a. x=y y= temp x=temp b. temp=x x=y
4. Which of the following code segments correctly swaps the values of variables named x and y?
a. x=y y= temp x=temp
b. temp=x x=y y=temp
c. x=y temp=x y=temp
d. temp=x y=x x=temp
5. Which type of sort compares list items in pairs, swapping any two adjacent values that are out of order?
a. insertion sort
b. idexed sort
c. bubble sort
d. selection sort
6 . Data stored in a table that can be accessed using row and column numbers is stored as a?
a. Single dimensional
b. Two- dimensional
c. Three- dimensional
d. Nondimensional
7.Each element in an array must have the same as the others.
a. data type
b. subscript
c. value
d. memory location
Which of the following must every method have?
a. aparameter list
b. a header
c. a return type
d. all of the above
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access with AI-Powered Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started