Programming Quiz

Results

#1 What is the output of the following code segment?

#2 What is the output of the following code segment?

#3 How does the array ‘a’ look like after executing the following code segment? (a.length represents the length of the array)

#4 Which of the following is not a reserved keyword in java?

#5 What is the output of this code?

#6 What is the result of the above code segment when executed?

#7 Are both the outputs of code segment (i) and code segment (ii) equal?

#8 Consider the following code segment where ‘f’ is a function that is defined as shown below. What value is returned by the function call f ( 30 , 100 ) ?

#9 What is the output of the following program?

#10 What is the output of the following code segment?

finish