Sie sind auf Seite 1von 2

PADMA SESHADRI BALA BHAVAN SR.SEC.

SCHOOL - NUNGAMBAKKAM
INFORMATICS PRACTICES – Practice Paper

Class XI
Answer the following:

Theory questions:
JAVA WITH NETBEANS

1. What do you mean by iterations statements? Explain with their syntax.


2. Differentiate while and do …while loop.
3. Compare for… loop and while … loop
4. What is the role of <update expression> in for loop statement.
5. Explain the following java string functions with an example.
a. Concat() b. equals() c. substring(..) d. charAt() e. length()
f. toUpperCase() g. toLowerCase() f. length()

DATABASE & MYSQL

6. What is MYSQL? Write any functions and features of MYSQL.


7. What do you mean by client server technology?
8. Write full form of a. DBMS b. SQL
9. Explain the following
a. Primary key b. Candidate Key c. Alternate key d. Relation
e. Table f. Attribute g. Tuple h. Degree i. Cardinality
10. Name the known data types in MYSQL.

Debug the following:


11. a. The following code has error(s). Rewrite the correct code underlining all the corrections made

int Sum = 1 , Step = 5 ;


int i ;
for ( i = 0 ; i < = 5 , i ++) ;
{
Step += 5 ,
Sum += Step ;
}
jTextArea1 . showText ( " " + Sum )

b. Find out errors if any:

int i; sum= 0;
i=1 ;
while (i<=5)
{
sum =sum +i
i+=3
} System.out.println(sum) ;

Predict the output:


12. a. Predict the output of the following code fragments:
int val1 =5; val2=10;
for(int i=1;i<=3;i++)
system.out.println(“ “ +val1++ + “,” + --val2);
system.out.println(“ “ +val2-- + “,” +++va12);

b. How many times the loop gets executed and write the output.
int x=0;
do{
System.out.print(“Welcome to MYSQL”);
}while(x!=0);
13. Rewrite the following code using while loop :
a. int i,j;
for(i=1,j=2;i<=6;i++,j+=2)
System.out.println(i++);
System.out.println(“Finished!!!”);

b. Rewrite the following code using do.. while loop


int sum=0, i=1;
while(i<=5)
{
sum=sum+i;
}
14. a. Write a program to print sum of even numbers between 31 to 60.
b. Write a program to print sum of digits of the given number. (use textfields
for Input/Output)
c. Write program to find factors of the given number. (use textfields for I/O)
d. Write a program to find sum of any five random numbers using do… loop.
Accept input using input dialog and display output using message dialog
15. Write a program to display the following patterns:
a. 5 b. &
5 10 & &
5 10 15 & & &

16. Write SQL command to create the given table SPORTS.


Field name: Data type
coach_id numeric (5 digit)
coach_name text - 25 character length
age numeric ( 3 digits)
sports text – 25 character length.

Das könnte Ihnen auch gefallen