Formatting page ...
ST JUDE S PUBLIC SCHOOL AND JUNIOR COLLEGE, KOTAGIRI COMPUTER APPLICATIONS SECTION A: MARKS :100 Question 1: (a) Name any four tokens of Java. [2] (b) Give the difference between actual parameter and formal parameter. [2] (c) What is an identifier? [2] (d) Write an expression in Java for . [2] (e) What is the result produced by 2 10*3 + 100/11? Show the steps. [2] Question 2: (a) What is the difference between local variable and instance variable? [2] (b) int x =20, y = 10, z; What is the value of z in z = ++x * (y ) y ?Show the steps [2] (c) What is the purpose of default in a switch? [2] (d) Give the difference between linear search and binary search. [2] (e) What will be the output of the following code? float x = 7.87; System.out.println(Math.ceil(x); System.out.println(Math.floor(x); [2] Question 3: (a) State the difference between if-else if ladder and switch...case. [2] (b) Explain the concept of constructor overloading with an example. [2] (c) What will be the output of the following program segments? (i) String s = application ; int p = s.indexOf( a ); System.out.println(p); System.out.println(p+s); [2] (ii) String st = PROGRAM ; System.out.println(st.indexOf(st.charAt(4))); [2] (iii) int a = 0; if(a>0 && a<20) a++; else a-- ; System.out.println(a); (iv) int a= 5, b = 2,c; if (a>b || a ! = b) c = ++a+--b; System.out.print(c+ +a+ +b); (v) int i = 1; while(i++<=1) { i++; System.out.print(i + ); } System.out.print(i); (d) (e) (f) [2] [2] [2] Differentiate between isUpperCase(char) and toUpperCase(char). [2] What is the difference between a constructor function and a member function of a class? [2] What is the difference between a static member function and a member function which is not static ? [2]
|