Trending ▼
ICSE
CBSE 10th
ISC
CBSE 12th
CTET
GATE
UGC NET
Vestibulares
ResFinder
Computer Half Yearly Exam
3 pages, 0 questions, 0 questions with responses, 0 total responses
,
0
0
subhan
+Fave
Message
Profile
Timeline
Uploads
Home
>
subhan
>
Formatting page ...
HALF YEARLY EXAMINATION Computer Application CLASS X Max. Marks : 80 Time : 2hr This paper is divided into two Sections. Attempt all questions from Section-A and any four questions from Section-B. The intended marks for questions or parts of question are given in brackets [ ]. ________________________________________________________________________________ SECTION - A (40 Marks) Q.1. (a) Differentiate between If and Switch statement. (b) What is a gall through situation in a switch case statement? (c) In what ways a class is treated as an object factory? (d) Name two different styles of expressing a comment in a Java program. (e) Different between System.out.print() and System.out.println() statements. [2] [2] [2] [2] [2] Q.2. (a) Define the term byte code? (b) Distinguish between an operator and an expression. (c) Differentiate between = and == operators . (d) What will be the output, x=5? (i) 5*x++ (ii) 5*++x (e) If m=5, n=2; what will be the output of m and n after execution of? (i) m-=n; (ii) n-=m+m/n; [2] [2] [2] [2] Q.3. [2] (a) Write an equivalent while loop for the following for statement: [3] int n=50; for(int i=10; i>=2; i=i-2) { n++; } (b) Write an equivalent switch-case construct for the following decision making statement: [3] int a; if(s1 == 1) a=1; if(s1 == 2) a=2; if(s1 == 3) a=3; (c) Write down the syntax of the following: (i) To accept the integer value from the user through console. (ii) To accept a fractional value from the user through console. (iii) If else statement. (iv) Switch-case statement. [4] Q.4. Explain the following with an example of each: (i) Arithmetical operator. (iii) Logical operator. (ii) Relational operator. (iv) Ternary operator. Q.5. Evaluate the following expressions, the values of variables are: p=7, q=9, r=9 [4] (i) p*(q++%4)*(--r) (iii) p+=(--+5)*(p++)(r/2) (ii) (r--)%5+(r++/5)*p (iv) q*=5+(--q)*(q++)+10 Q.6. Explain with the help of an example, the purpose of default in a switch statement. [4] [2] SECTION B (60 Marks) Attempt any four questions from this Section. The answers in this Section should consist of the Program in BlueJ environment with Java. Each program should be written using Variable description. Q.7. An electricity board charges the bill depending on the number of units consumed as follows: Units Consumed Rate per unit First 100 units 40 p. per unit Next 200 units 60 p. per unit Above 300 units 100 p. per unit Write a java program to accept total number of units consumed from the user and calculate the bill amount to e paid using above criteria. Print the bill (assume that a meter rent of Rs.500 is paid by every customer .) [15] Q. 8 . (a) Write a program to input Binary number (base 2) and convert it into its Decimal equivalent form (base 10). [7.5] (b) Write a program to print the following pattern: [7.5] 8264462 826446 82644 8264 826 82 8 Q.9. Write a menu based program to display the roots of a quadratic equation (ax2+bx+c=0). Also print whether the roots are Imaginary, Real or Distinct, when: (i) If b2-4ac<0 print Imaginary roots. (ii) If b2-4ac>0 print Real and Distinct roots. Print their roots by using the formula Root 1: -b+ b2-4ac/2a and Root 1: -b- b2-4ac/2a. (iii) If b2-4ac=0 print Equal roots and value of both roots are equal, i.e., -b/2a. [15] Q.10. Program to print the sum of two numbers or product of two numbers or difference of two numbers or division of two numbers or remainder of two numbers according to the choice of the user. 1 for Sum, 2 for Product, 3 for Difference, 4 for Division , 5 for Remainder otherwise display the message Wrong Choice . [15] Q.11. Write a program to enter a number by the user and check whether the number is a Special number or not. Special Number:- A number is said to be special if the sum of factorial of each digit is equal to the number itself. [15] Q.12. (a) Write a program to print the sum of the following series: Sum=a/1+a/2+a/3+a/4+ +a/n. Where a=2 and n=10. (b) Write a program to display the first eight terms of the series: 1, 11, 111, 1111, . [7.5] [7.5]
Formatting page ...
Formatting page ...
Print intermediate debugging step
Show debugging info
Hide debugging info
Horizontal lines at:
Guest Horizontal lines at:
AutoRM Data:
Box geometries:
Box geometries:
Text Data:
© 2010 - 2025 ResPaper.
Terms of Service
Contact Us
Advertise with us