मराठी

(English Medium) ICSE Class 10 - CISCE Question Bank Solutions for Computer Applications

Advertisements
विषय
अध्याय
विषय
मुख्य विषय
अध्याय
Advertisements
Advertisements
Computer Applications
< prev  41 to 60 of 259  next > 

Convert the following while loop to the corresponding for loop: 

int m = 5, n = 10;
while (n >= 1)
{
System.out.println(m*n);
n--;
}
[9] Nested Loop
Chapter: [9] Nested Loop
Concept: undefined >> undefined
System.out.print("BEST "); 
System.out.println("OF LUCK"); 

Choose the correct option for the output of the above statements. 

[6] Class as the Basis of All Computation (Objects and Classes)
Chapter: [6] Class as the Basis of All Computation (Objects and Classes)
Concept: undefined >> undefined

Advertisements

Analyze the given program segment and answer the following questions:

(i) Write the output of the program segment.
(ii) How many times does the body of the loop gets executed?

for (int m=5; m<=20;m+=5)
{   if(m%3==0)
   break;
else
if(m%5==0)
System.out.println(m);
continue;
}

[9] Nested Loop
Chapter: [9] Nested Loop
Concept: undefined >> undefined

Give the output of the following expression:
a+= a++ + ++a + -- a + a--; when a = 7;

[1] Introduction to Object Oriented Programming Concepts
Chapter: [1] Introduction to Object Oriented Programming Concepts
Concept: undefined >> undefined

Write the return type of the following library functions: 

  1. isLetterOrDigit(char)
  2. replace(char, char) 
[6] Mathematical Library Methods
Chapter: [6] Mathematical Library Methods
Concept: undefined >> undefined

Evaluate the value of n. if value of p = 5, q = 19  
int n = (q – p) > (p – q) ? (q – p) : (p – q) 

[3] Values and Data Types
Chapter: [3] Values and Data Types
Concept: undefined >> undefined

Arrange the following primitive-data types in ascending order of their size:
(i) char (ii) byte (iii) double (iv) int

[3] Values and Data Types
Chapter: [3] Values and Data Types
Concept: undefined >> undefined

Write a Java expression for the following :

`sqrt(3"x"+"x"^2)/"a+b"`

[4] Operators in Java
Chapter: [4] Operators in Java
Concept: undefined >> undefined

What is the value of y after evaluating the expression given below?

y+= ++y + y-- + --y; when int y=8; 

[3] Values and Data Types
Chapter: [3] Values and Data Types
Concept: undefined >> undefined

What are the values of a and b after the following function is executed if the values passed are 30 and 50?

void paws(int a, int b) 
{ a = a + b; 
  b = a - b; 
  a = a - b;' 
System.out.println(a + "," + b); 
} 
[3] Values and Data Types
Chapter: [3] Values and Data Types
Concept: undefined >> undefined

State the data type and value of y after the following is executed: char x = 7; y = Character.isLetter(x); 

[3] Values and Data Types
Chapter: [3] Values and Data Types
Concept: undefined >> undefined

Give the output of the following :

(i) Math.floor (- 4.7)

(ii) Math.ceil(3.4) + Math.pow(2,3)

[6] Mathematical Library Methods
Chapter: [6] Mathematical Library Methods
Concept: undefined >> undefined

Name the mathematical function which is used to find sine of an angle given in radians.

[6] Mathematical Library Methods
Chapter: [6] Mathematical Library Methods
Concept: undefined >> undefined

Name a string function which removes the blank spaces provided in the prefix and suffix of a string. 

[6] Mathematical Library Methods
Chapter: [6] Mathematical Library Methods
Concept: undefined >> undefined

Give the output of the following string functions: 

  1. “ACHIEVEMENT”.replace(E’, ‘A’)
  2. “DEDICATE”.compareTo(“DEVOTE”)
[4] String Handling
Chapter: [4] String Handling
Concept: undefined >> undefined

Using the switch statement, write a menu-driven program for the following: 

(i) To print Floyd’s triangle [Given below]

1

2      3

4      5       6

7      8       9      10

11    12    13     14    15

(ii) To display the following pattern:

I

I     C

I     C      S

I     C      S     E

For an incorrect option, an appropriate error message should be displayed. 

[1] Introduction to Object Oriented Programming Concepts
Chapter: [1] Introduction to Object Oriented Programming Concepts
Concept: undefined >> undefined

Rewrite the following using ternary operator : 

if (bill > 10000)
discount = bill * 10.0 / 100;
else
discount = bill * 5.0 / 100;
[4] Operators in Java
Chapter: [4] Operators in Java
Concept: undefined >> undefined

Give the output of the following program segment and also mention how many times the loop is executed : 

int i; 
for (i = 5; i > 10; i++) 
System.out.println(i); 
System.out.println(i * 4);
[9] Nested Loop
Chapter: [9] Nested Loop
Concept: undefined >> undefined

Design a class Railway Ticket with following description: 
Instance variables/data members:
String name: To store the name of the customer
String coach: To store the type of coach customer wants to travel
long mob no: To store customer’s mobile number
int amt: To store a basic amount of ticket
int total amt: To store the amount to be paid after updating the original amount

Member methods
void accept (): To take input for a name, coach, mobile number and amount
void update (): To update the amount as per the coach selected

(extra amount to be added in the amount as follows)

Type of Coaches Amount
First_ AC 700
Second_AC 500
Third _AC 250
sleeper None

void display(): To display all details of a customer such as a name, coach, total amount and mobile number.

Write a main method to create an object of the class and call the above member methods. 

[4] String Handling
Chapter: [4] String Handling
Concept: undefined >> undefined

Write two separate programs to generate the following patterns using iteration (loop) statement:

(a)

[8] Iterative Constructs in Java
Chapter: [8] Iterative Constructs in Java
Concept: undefined >> undefined
< prev  41 to 60 of 259  next > 
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×