Home / MCQ Bank / Computer
Computer Miscellaneous In Java

What will be the output of the following Java snippet, if attempted to compile and execute? class abc { public static void main(String args[]) { if(args.length>0) System.out.println(args.length); } }

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option D • The snippet compiles and runs but does not print anything

Related Computer Questions

Which one of the following problem types does inclusion-exclusion principle belong to? Which of the following elements are used in an e-mail to express emotions or feelings clearly? What is the output of the following code? #include<stdio.h> #include<limits.h> int mat_chain_multiplication(int *mat, int n) { int arr[n][n]; int i,k,row,col,len; for(i=1;i<n;i++) arr[i][i] = 0; for(len = 2; len < n; len++) { for(row = 1; row <= n - len + 1; row++) { col = row + len - 1; arr[row][col] = INT_MAX; for(k = row; k <= col - 1; k++) { int tmp = arr[row][k] + arr[k + 1][col] + mat[row - 1] * mat[k] * mat[col]; if(tmp < arr[row][col]) arr[row][col] = tmp; } } } return arr[1][n-1]; } int main() { int mat[6] = {20,25,30,35,40}; int ans = mat_chain_multiplication(mat,5); printf("%d",ans); return 0; } What is the key difference between binary search and interpolation search? What will happen when the function call operator is overloaded?