computer 2
computer 2
c. 120 200 16
d. None
a. int[] A = {}
b. int[] A = {1, 2, 3}
c. int[] A = (1, 2, 3)
d. int[][] A = {1,2,3}
Q 2. (Any 5 ) [10]
1. What would be the output
If a=5,b=3. The value of c would be
a. int c=a+b*7/2
b. float c=a-b/2*9/4
2. What are methods and types of methods in java
3. if int p=5, q=4;
What is the value of r
1. r=p+q++ + q--;
2. r=p/q + --q /q++;
4. Write a difference between Linear searching and Binary Searching
5. Write the difference between searching and sorting.
6.. Write a java statement for each to perform the following task:
(i) Find and display the position of the last space in a string str.
7. Extract the second character of the string str.
SECTION B ( Any 1 ) 10 Marks