Computer Science, asked by subirniyogi2017, 5 months ago

if you can answer any then please help. I need them within 24Dec2020.
Even a single answer is appreciated

(a) State the number of bytes and bits occupied by a character array
of 10 elements.

(b) Differentiate between Binary Search and Linear Search techniques.

(c) What is the output of the following:
String a="Java is programming language \n developed by \t\'James Gosling\'";
System. out. println(a);

(d) Differentiate between break and System. exit(0).

(e)Write a statement in Java for √(+)3/|−|

(f) What is the value of m after evaluating the following expression:
m - = 9%++n + ++n/2; when int m=10,n=6

(g) Predict output of the following:
(i) Math.pow(25,0.5)+Math.ceil(4.2)
(ii) Math.round ( 14.7 ) + Math.floor ( 7.9)

(h) Give the output of the following java statements:
(i) "TRANSPARENT".toLowerCase();
(ii) "TRANSPARENT".compareTo("TRANSITION")

(I) 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.
(ii) Extract the second character of the string str.​

Answers

Answered by ManalBadam
2

(a)

→ As size of char is 2 bytes, a character array of 10 elements occupies 2 x 10 = 20 bytes.

(b)

→ The major difference between linear search and binary search is that binary search takes less time to search an element from the sorted list of elements. So it is inferred that efficiency of binary search method is greater than linear search.

(c)

→ public static void main (String args[]) What is the ... Design a program in Java to display the following information on the output screen: Name: ... 5"); System.out.println("Subject: Computer Applications" ); ...

(d)

→ exit() is a standard library function. break causes an immediate exit from the switch or loop (for, while or do). exit() terminates program execution when it is called. break is a reserved word in C; therefore it can't be used as a variable name.

(e)

Answered by nilakanthasahu496
0

Answer:

I don't know bbbvvvvvvvvvvvv

Similar questions