Trending ▼   ResFinder  

model questions: Computer Applications (Modern High School for Girls (MHS), Kolkata)

12 pages, 51 questions, 7 questions with responses, 7 total responses,    0    0
Sarashika
Modern High School for Girls (MHS), Kolkata
5th to 10th
+Fave Message
 Home > saika >   F Also featured on: School Page

Formatting page ...

Computer Application ICSE Model Questions Section 1 a) b) a. b. c) d) e) Question 1: Class is a user defined data type. Explain. What will the following function return when execute? Math.rint(17.6); Math.ceil(-7.8); Explain the term for loop with an example. State the difference between Constructor and Method. Explain with the help of an example, the purpose of default in switch statements. a) b) c) d) e) a. b. Question 2: Difference between operator and expression. Explain the meaning of break and continue statement. State one similarity and one difference between while and do while loop. What is call by value? Write a statement to perform the given task: To generate random number between 0 and 1. To find the value of Sin300. a) b) a. b. c. c) d) Question 3: What is fall through? Give an example. Write down the syntax to perform the following: to create a Scanner object. to accept an integer through Scanner class to accept a word through Scanner class Differentiate between isLowerCase() and toUpperCase() methods. What is function prototype? a) b) Question 4: Enter any two variables through parameterized constructor. Write a method to swap and print the values. Predict the output for the following functions: String st1= India ; String st2= wins ; String st3= World Cup Cricket 2011 ; i) System.out.println(st1+st2+st3); ii) System.out.println(st3.length()); iii) System.out.println(st3.substring(0,10)); iv) System.out.println(st3.charAt(0)+st3.charAt(6)+st3.charAt(10)); c) What do you understand by return statement in a method? If a number of return statements are used in a program, how many of them can be executed at a time? Question 5 (a) State the difference between while and do-while statement. (b) What is break in switch statement. (c) What do you mean by this keyword. (d) What is meant by an infinite loop? Give an example. (e) State the difference between constructor and function (method). Page 1 of 12 Computer Application ICSE Model Questions Section 1 Question 6 (a) Name the following i) A package needed to perform input and output tasks. ii) A function that returns index of last occurrence of a specified character. iii) A function to remove leading and trailing space of string. iv) A OOPs principal that implement function overloading. (b) Write any two Non primitive data type. (c) Distinguish between char and String . (d) Write an equivalent Java expression for 1 s = ut + at 2 2 i) r= i) ii) iii) iv) i) ii) iii) iv) b + b 2 4ac 2a ii) Question 7 (a) What do you understand by prefix and postfix operators? Give example. (b) Give the output of the following. char ch= A ; int x = 32, y = 2; System.out.println(ch+y); System.out.println(ch+x); System.out.println(++ch); System.out.println((char)(ch+x+y)); (c) What do you mean by Object. (d) Find the value of z in the following program segment. int x = 5, y = 12, z; z = (x>= y ? x y : y x ); (e) if String x = Computer , y = Applications ; What do the following functions return for: x.compareTo(y); y.indexOf(y.charAt(8)); x.length( ) > y.length( ); y.indexOf( i ,4); (f) Explain Function. Write the syntax of user defined function. (g) Difference between default and parameterized constructor. (a) (b) (c) (d) (e) Question 8. Differentiate between class variable and Instance variable. Mention two difference between Binary search and Linear search? Define wrapper class. What do you mean by rvalue and lvalue? Why is class also called composite data type? Give an example also. (a) (b) (c) (d) Question 9. State the difference between Constructor and Method. Define fall through. What is the difference between ordinary compilation and Java compilation? What is the difference between String and StringBuffer? Page 2 of 12 Computer Application ICSE Model Questions Section 1 (e) What is meant by private visibility of a method? Question 10. (a) Name the keyword that (i) Transfers the control to the beginning of the loop and skips the rest of the loop body. (ii) The variables whose single copy is made for all the objects of a class. (iii) The keyword that is used to distinguish between instance variable and local variables. (b) Give the output of the following: int x=10; int y=20; if((x<y)||(x=5)>10) System.out.print(y); else System.out.print(x); (c) What will be the output of the following program segment? String name[]={ Board , Examinations }; System.out.println(name[0].length()); System.out.println(name.length()); (d) Find the output class Aa { void display() { int a[]={2,5,8,5,3}; int i=2; a[i]+=(a[i+1]++)-(--a[i-1]); for(i=0;i<5;i++) System.out.println(a[i]); } } (e) Differentiate between base and derived class. (f) (g) (h) (i) Write the java expressions for Write function prototype that returns a Boolean value and takes two characters as parameter. Java various Math functions are defined in which class and under which package. Write a single line statement using ternary operator to find the maximum of three numbers. 1. a. b. 2. Question 11. Name the following: A package that is invoked by default. A keyword that is used to allocate space in the memory. Write an equivalent java syntax for the following expression: x= b b2 4ac 2a 3. Mention any two attributes required for class declaration. Q12. Differentiate between base class and derived class. Page 3 of 12 Computer Application ICSE Model Questions Section 1 Q13. Convert the following segment into equivalent for loop. int k=1,i=2; while(++i<6) k*=i; Q14. What is exception handling? Explain. Q15. Write a statement each to perform the following task on a string and a character: a. Extract the second last character of a word stored in the variable wd. b. Execute the function and give the output - Character.isWhiteSpace( ) . Q16. Why is an object called an instance of a class? Q17. Give the size in bytes, of the arrays a[5] of int data type and d[4] of double data type. Q18. Give the name of two jump statements. Q19. Give the output of the following: String n= computer applications ; String m= java virtual machine ; a. System.out.println(n.substring(3,8).concat(m.substring(7)); b. System.out.println(m.lastIndexOf( a )); Q20. Analyse the following program segment and determine how many times the loop will be executed and what will be the output of the program segment? int a=150; while(true) { if(a<100) break; a=a-20; } System.out.println(a); Q21. Evaluate the expression given below: If p=7, q=9, r=11; p * (q++ % 4) * (++r) Q22. Different between long and Long. Q23. Rewrite the following segment using ternary operator: if(p>=5500) s=p*(5/100) else s=p*(15/100) Q24. Explain the use of hasNextBoolean() function with an example. Page 4 of 12 Computer Application ICSE Model Questions Section 1 Q25 i) Differentiate between actual parameter and formal parameter with the help of examples ii) Give the output of the following int x=13^3&8; System.out.println (x); iii) What will be the value if x=3 initially x+=x++---x+x -iv) Define operator and operand Q26 i) Give the output class super{ void in( ) { x=10,y=20; if(x<y||(x==5)>10) System.out.println(x); else System.out.println(y); } } ii) Define default constructor and why is it called so? iii) Distinguish between pure and impure functions with examples Q27 i) Give the output class outt { public void av( ) { for(i=0;i<=10;i++) { if(i==6) break; } System.out.println(a); } } ii) Define encapsulation, inheritance, polymorphism iii) What is call by value and call by reference? i) ii) Q28 What is NumberFormatException? Present a suitable example Are there any demerits of array? If so, write briefly Page 5 of 12 Computer Application ICSE Model Questions Section 1 iii) iv) For initial value of a=4, b= -3, c=0, what will be the value of the x in following expressions, if they took place successively? x = a+ b++ + --c +++b c++ x += ++b +++a +- -c+ a What is wrapper class? Mention name of any two wrapper class Q29. (a) Explain function overloading with an example. (b) What is keyword.Give two example. (c) Differentiate between Interpreter and Compiler . (d) Mention two characterstic of java ? Q30. (a) Write a statement to print the character at index 5 in a string str. (b) What will be the output of the following code :StringBuffer city = new StringBuffer ("Madras") ; String str="MADAM"; city.insert(0, "Central") ; System.out.println(city) ; System.out.println(str.replace('M','A')); (c) What is the difference between unary and binary operator? Q31. (a) Define the integer data members numl and num2 in the class. Initialise them with the values in a default constructor. (b) Write an equivalent Java expressions for the following expressions : 1 1 2 2 i) f = + ii) u v h= l +b (c) What will be the output for the following program segment? (i) System.out.println(10%5) System.out.println(10/5) (ii) a- - + ++a%4; if a = 5 (iii) System.out.println(10<10) (iv) System.out.println(10==10) (d) Rewrite the following if-else statement in terms of switch-case statements? char code; if(code=='A') System.out.println("Excellent"); else if(code =='B' || code =='C') System.out.println("Good"); else if(code =='D') System.out.println("Poor"); (e) What do you understand by JVM? (f) What do you understand by primitive and non-primitive data type? Page 6 of 12 Computer Application ICSE Model Questions Section 1 (g) Convert the following segment into equivalent for loop and do while loop public void display() { int i=10; while ( i !=0) { System.out.print(i +" "); i-- ; } } (h) What will be the output for the following program segment? int a = 10,b=30,c=40; a= --b + c * a / 2; System.out.print("a" + a); System.out.print("b " +b ); Q32 a) Define Inheritance and give an example. b) Explain polymorphism with a suitable example. Q33. a) Find the value of x after evaluation if initial value of x is 5 (i) x+=x++ + ++x + x-(ii) x /=x + --x + --x + x b) Write a statement in Java to do the following if String n = Mahatma Gandhi ; (i) To print atma (ii) To print Gandhi c) Write the keyword to convert a string to integer and integer to string. d) Differentiate between an infinite loop and empty loop. e) If int a[] = {1,2,3,4,5}; what will be the output? (i) System.out.println(a.length+10); (ii)System.out.println(a[0] + a[4] / 5); Q34. a) Write the output? (i). double d = + 7/8 + 6%9; (ii) class abcd { private int x; private int y; void abcd(int a, int b) { x = a; y = b; } void display() { int z = (x>y)? 3:4; System.out.println( Your answer is +z): } Page 7 of 12 Computer Application ICSE Model Questions Section 1 void main( int m, int n) { abcd s = new abcd(m,n); s.display(); }} if input is : -9 & 7 (iii) class xclass { void sumnum(int m, int n) { System.out.println (m+n); } void main() { sumnum(7,9); }} b) Find the errors in the following program segment: class friendly { public int a; private void friendly(int x) { x = a; } public void main() { system.out.println(a); } } Q35. a) Differentiate between a syntax error and logical error? b) If boolean x =true, y = false and z = true what will be the result of the following program segments. (i) x !! y &&z (ii)x&&y &&z (iii)!x&&!z (iv) if (y) System.out.println( Good ); else System.out.println( Better ); c) Explain binary and linear search, Which is preferable and why? d) What is precision . What is the capacity of storing data in data types float and double? Q36. a) What do you mean by temporary instances of a class? b) Differentiate between Pure and Mixed expression? c) Illustrate ? operator. d) Mention two different styles of expressing a comment in a program. Q37. a)What is a compound statement? Give an example. b) Differentiate between actual and formal parameters. Page 8 of 12 Computer Application ICSE Model Questions Section 1 c) What is function prototype? Give an example. Q38. a) What will be the output of the following code: import java.io.*; public class a { public static void main( String args[ ] ) throws IOException { byte x = 64, y; y = (byte) (x << 2); system.out.println( y); } } (b) What will be the output of the following code: String a, b; a = "WORK"; b = "HARD"; int m = a.length( ), n = b.length( ); int i, j; for(i=0,j=n-1;i<m;i++,j--) { System.out.print(a.charAt(i)); System.out.print(b.charAt(j)); } (c) What will be the output of the following code: int i; String s = "Third revision"; int L = s.length(); for (i = 2;i<=L-1;i=i+2) System.out.print( s.charAt(i)); (d) If x = 10 , y= 5, calculate the value of z = ++x - y-- + x++ + y x Q39. a) What is the output of the following code? int n = 10; while ( n!=1) { if ( n % 2 == 0) n = n / 2; else n = (3 * n ) + 1; System.out.println ( n ); } b) What is the output of the following code? int arr[ ] = {55,72,3,51,24}; int i,r1,r2; r1 = arr[0]; Page 9 of 12 Computer Application ICSE Model Questions Section 1 r2 = arr[4]; for(i=0;i<5;i++) { if(r1<=r2) r2 = r1; else r2 = r2; } System.out.println( r1); System.out.println( r2); c) Write the function of each of the following with an example : i) trim( ) ii) indexOf( ) d) What is Exception in JAVA? a) b) c) d) e) f) g) h) i) j) Q40. Answer the following: What is the range of long data type ? What do you mean by non-graphic characters ? What is the purpose of the keyword extends ? What do you mean by data hiding ? How many bytes reserved for char data type in java? What is a token? What was the old name of java ? Expand IDE. Name any two OOPs other than C++ and java. What do you mean by coersion ? a) b) c) d) Q41. Write Short notes Fall through Logical Operators Iteration construction Polymorphism a) b) c) d) e) f) Q42. Differentiate between construction overloading and function overloading Math.ceil( ) and Math.floor( ) equals( ) and equalsIgnoreCase ( ) encapsulation and abstraction class and object member function and data member a) b) c) d) e) Q43. Write output System.out.println( Barak Obama .substring(6)); System.out.println( Information Technology .lastIndexOf( o )); System.out.println(Math.abs(Math.sqrt(9)*(-1))); char c = (5.9>4.8)? 65:97; System.out.println( c); System.out.println(Math.rint(12.56)= = 13); Page 10 of 12 Computer Application ICSE Model Questions Section 1 f) g) h) i) j) System.out.println("sum "+a+b); if int a=5, b=8; System.out.println(a+b+" sum "); if int a=5, b=8; System.out.println(a*b+" prod "); if int a=5, b=8; System.out.println(c++ +c/2 - --b); if int c=6, d=5 System.out.println("65".compareTo("A")); Q. 44. Fill in the blanks. A member function having the same name as that of its class is called _____ function. An _____ is a combination of token i.e., of literals ,operators , variables and parenthesis used to calculate a value. c. JVM combined with _____ makes Java platform. d. The Java statement available to jump from one loop to another is _____. e. _____ means that if the two operand bits are different , the result is 1. a. b. a. b. c. d. e. Q.45. Differentiate between: switch and if-else continue and continue label class and object equals( ) and equalsIgnoreCase( ) parameterized and non-parameterized constructor a. b. c. d. e. Q.46. Write short notes with example: Nested Loop Wrapper class Ternary Operator this keyword Package Q.47. Answer the following: a) What are escape sequences ? List any two sequences with their functions. b) How is ordinary compilation process different from java compilation ? c) Why it is said that java is an universal language ? e) What is blueJ ? Q 48. Create an object of class test . Q49 a. Find the value of x after evaluation if int x =5; (i) x+=x++ + (x%17) (ii) x /=x +( x/10) b. What is the function of the keywords (i) .charAt() (ii) Character.isLetter() c. What is type promotion in Java? d. Differentiate between print() and println() function with suitable example? e. If int a[] = {1,2,3,4,5}; what will be the output? (i) System.out.println(b+a[2]); (ii)System.out.println(a[0] % (a[4] / 5)); Q50 a. Write the function of keyword static and final? Page 11 of 12 Computer Application ICSE Model Questions Section 1 b.Is it necessary for a java class to have a constructor? Clarify your answer? c. Write the output? If String k = Malayalam ; (i). k.lastIndexOf( a ); (ii) for(int i =k.length()-1 ; k>=0 ; k--) System.out.print(k.charAt(i)); (iv) class xclass { void sumnum(int m, int n) { System.out.println (m+n); } void main() { sumnum(7,9); }} d. Find the errors in the following program segment: class myname { public int a; private void friendly(int x) { a=x; } public void main() { system.out.println(a); } } Q51 i) What is function prototype? How is it different from function signature? ii) What will be the output of the following? public class Demo { void display() { int m=5, n=10; m += n++; n += m++; System.out.println( m = + m + \t n = + n); } } iii) Find the answers: a) System.out.println( Math.ceil ( 4.56 )); b) System.out.println( Math.sqrt ( Math.floor(2.25)); iv) What is the legal range of values of short type of data? v) Find the output: If given that String S = CLASSMATE a) System.out.println( I am not an + S.substring(2, 5)); b) System.out.println(Math.abs( Math.sqrt ( S.lastIndexOf( S )))); Page 12 of 12

Formatting page ...

Top Contributors
to this ResPaper
(answers/comments)


Vaidehi Mishra

(4)

Shania Pais

(2)

jdmanhere

(1)

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

Formatting page ...

 

  Print intermediate debugging step

Show debugging info


 

 

© 2010 - 2025 ResPaper. Terms of ServiceContact Us Advertise with us

 

saika chat