Help me answer whether is true of false 1. Local scope and global scope variable
ID: 3535749 • Letter: H
Question
Help me answer whether is true of false
1. Local scope and global scope variables can have the same name.
2. the compiler will create a default constructor if you do not.
3. Quick search can be used on any array.
4.Linear search starts checking in middle of the arroy.
5. Bubble sort requires n-1 (with n being the number of valves to swap) passes to sort an array worst-case scenarios.
6. Variable inside a function always have an effect on the outside world.
7. Bubble sort is superior to selection sort in both comparisons and moves.
8. Arrays passed to function are duplicated in memory.
9. The array passed $ is used to pass variables by refrence.
10. A function prototype is all you need in order to use that function.
11. Function prototypes are unnecessary if you write your function definition each code(ex : function definition comes before int main())
12. Vectors are referenced similary to arrays.
13. DO-while loops are considered post-test loops.
14. Internal sorts are sorts that occur on data that can be held complety with ?
Explanation / Answer
1) True
2) true
3)true
4)False as it starts from begining
5)true for sorted array (worst case)
6)False they are only confined to the function (local variables)
7)False both take same work but not moves
8)True they are copied
9)True so changes made to them in function are reflected in the main function
10)true
11)false function prototypes are always necessary variable names are not necessary
12)True
13)False it is a pre test loop(do is performed at least once)
14)True
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.