SlideShare une entreprise Scribd logo
1  sur  6
Télécharger pour lire hors ligne
Sample Paper 2
CLASS : XI
TIME : 3Hrs. SUBJECT : INFORMATICS PRACTICES (065)
M.M. 70
1.(a)What value is assigned to num in the following code fragment, when choice equals 2? 1
switch (choice)
case 1: num=1; break;
case 2: num=3; break;
case 3: num=2; break;
default: num=0;
(b) How many times is the following loop executed? 1
int x=5;
int y=50;
while (x < 50)
x=x + 10;
(c) While working in NetBeans, Ms.Korpi wants to display “Pass” or “Needs to Reappear”
message depending on the marks entered in jTextField. Help her to choose the more
appropriate statement out ‘I statement’ and ‘Switch’ statement' 1
(d) Determine the error in the following statement: 1
int 2 = a, b = 5, c =11; d = 12;
(e) What is the difference between / and % operator? 1
(f) Identify the correct answer: 5×1=5
(i) If x=300 and y=700 then what will be the output of the following expression?
y – x < 500 ? 150 : 50
(a) 50 (b) 400 (c) 500 (d) 150
(ii) int a,b = 20;
a = 50 % 5;
b = b + a;
System.out.print(a);
System.out.print(b);
Out put will be
a) 10,30 (b) 0,20 (c) 50,20 (d)5,20
(iii) The statement i++; equivalent to
(a) i = i + i; (b) i = i + 1; (c) i = i-1; (d) i--;
(iv) int a=11;
int b=22;
Which of the following statement is correct:
(a) a >= b (b) a < b (c) a =< b (d) a > b
(v) Suppose,a=5 and b=2, then value of a%b is
(a) 5 (b) 2 (c) 1 (d)2.5
2.(a) Zridung wants to list the names of all the tables in his database namely Student. What
command should he write at MySQL prompt to get this result? 1
(b) A table “ Book “ in a database has degree 4 and cardinality is also 4. What is the number of
rows in it? 1
(c) Define Primary key in table. 1
(d) Ms Marina wants to remove the entire content of a table “CBSE” but not its structure. For
this he worte following MySQL command: DELETE * FROM CBSE; Was it correct? 1
e) Mrs Lima is using table – EMP with the following columns:
EMPNO, ENAME, SALARY , DOJ
She wants to display all information of students in descending order of ENAME. She wrote the
following MySQL query and she did not get the desired output,
SELECT * FROM EMP WHERE ORDER BY ENAME DESC;
Rewrite the above query to get the desired output. 1
(f) Identify the correct answer: 5×1=5
(i) Number of columns in table is called
(a) Power (b) Degree (c) Cardinality (d) Design
(ii) A database
(a) Contains table (b) Is a part of a table (c) Is same as a table (d) None of the
above
(iii) DML means
(a) Data Multiple
Language
(c) Data Monitoring
Language
(b) Data Matriculation Language
(d) Data Manipulation Language
(iv) SELECT INSTR(‘CORPORATE FLOOR’,’OR’); Result of the query is
(a) 2 (b) 2,5,14 (c) 2,3 (d) None of these
(v) POWER(m,n) returns:
(a) m raised to the n th power
(c) m raised to the m th power
(b) n raised to the m th power
(d) None of the above
3. (a) What message will be displayed after the execution of the following code? 2
int Age = 24,Relaxation=6;
int ModiAge = Age- Relaxation;
if (ModiAge < 18)
jOptionPane.showMessageDialog(Null, “ Not Eligible”);
else
jOptionPane.showMessageDialog(Null, “Eligible”);
(b) Rewrite the following program code using an if statement: 2
int C = jComboBox1.getSelectedIndex();
switch( C )
case 0 : FinalAmt = BillAmt; break;
case 1 : FinalAmt = 0.9 * BillAmt; break;
case 2 : FinalAmt = 0.8 * BillAmt; break;
default : FinalAmt = BillAmt;
(c) The following code has some error(s). Rewrite the correct code underlining all the corrections
made: 2
int sum = 0; Int i ;
for( i = 0 , I <= 5 , I ++)
Sum =sum + i ;
jTextArea1. showText (“ “ + sum);
(d) Rewrite the following program code using a for loop: 2
int i = 1, sum = 0;
do
sum += i;
i += 2;
While( i < 10);
(e) What will be the value of a and b after execution of following code; 2
int a = 1, b b = 2;
if ( ++b < 50)
a =a * b;
4. Create a table -VOTER with following structure and Insert at least four rows into it. 2+2+6=10
Filed name Date Type/size
Vno Integer(4)
Vname Varchar(30)
Age Integer(3)
Address Varchar(30)
Phone Double(16)
Write the SQLs for the followings:
(a) To list Vno,Vname,Age for all the the voters. This information should be sorted on Vname.
(b) To list all the voters where address is 'Guwahati'
(c ) To add oe new column named VSex datatype char(1) .
(d) To list voters where address is “Guwahati” but age not between 20 and 30.
(e) To delete the records of all those voters who are either residing in “Guwhati” or whose Age
<25.
(f) To drop the table.
5. (i) What do mean by variable in Java? 1
(ii) What is the purpose of if statement in Java? Describe different forms of if statement. 2
(iii) What is the use of while loop in Java ? Explain with one example. 2
(iv) Name one DML command of MySQL. 1
(v) Describe the syntax of CREATE TABLE command . 2
(vi) A numeric data field COUNTER stores a value 35675.8765. Write a command to round
off Counter to
(a) Whole number (b) Upto 3 decimal places 2
6. (i) Write a Java Desktop application to check whether the number is even or odd. 3
(ii) Write a program to calculate commission for the salesman. The commission is calculated
according to following rates:
Sales Commission
Rate
5001-12000 3%
12001-15099 5%
16000-19999 7%
Above 20000 10%
The program accepts the sales made by the salesman and displays the calculated commission. 4
(iii) Write a Java Desktop application to find the factorial of an integer 3
7 . Write SQL Commands for (a) to (e) and write the outputs for (f) on the
basis of the following table : Table : FURNITURE
NO ITEM NAME TYPE DATEOFSTOC
K
PRICE DISCOUN
T
1 White Lotus Double Bed 2002-02-23 3000 25
2 Pink feathers Baby Cot 2002-01-29 7000 20
3 Dolphin Baby Cot 2002-02-19 9500 20
4 Decent Office Table 2002-02-01 25000 30
5 Comfort zone Double Bed 2002-02-12 25000 30
6 Donald Baby cot 2002-02-24 6500 15
7 Royal Finish Office Table 2002-02-20 18000 30
8 Royal tiger Sofa 2002-02-22 31000 30
9 Econo sitting Sofa 2001-12-13 9500 25
10 Eating Paradise Dinning Table 2002-12-19 11500 25
(a) To list the type and price which dateofstock between 2002-02-15 to 2002-02-28. 1
(b)To change the price of all furniture by adding another Rs. 1000 to their price whose type is
sofa. 1
(c)To delete the record of all item where discount is 30. 1
(d) To display the price of Royal tiger. 1
(e) To list item name, type and price all items whose names ended with f. 1
(f) Give the output of following SQL statement : 1×5=5
(i) SELECT DISTINCT (TYPE) FROM FURNITURE;
(ii) SELECT ITEM,TYPE FROM FURNITURE WHERE DISCOUNT>25;
(iii) SELECT ITEM,TYPE,PRICE FROM FURNITURE WHERE TYPE=”BABY COT”;
(iv) SELECT PRICE FROM FURNITURE WHERE DATEOFSTOCK < ’2002-02-12’;
(v) SELECT INSTR(ITEM,’S’) FROM FURNITURE;

Contenu connexe

Tendances

FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEM
Amira Dolce Farhana
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paper
Deepak Singh
 

Tendances (20)

Cplus plus abd datastructure
Cplus plus abd datastructureCplus plus abd datastructure
Cplus plus abd datastructure
 
FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3FP305 data structure PAPER FINAL SEM 3
FP305 data structure PAPER FINAL SEM 3
 
FP305 data structure june 2012
FP305   data structure june 2012FP305   data structure june 2012
FP305 data structure june 2012
 
Sp 1418794917
Sp 1418794917Sp 1418794917
Sp 1418794917
 
Computer science ms
Computer science msComputer science ms
Computer science ms
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1
 
11th information practices paper CBSE INDIA 2012 2013
11th information practices paper CBSE INDIA 2012 201311th information practices paper CBSE INDIA 2012 2013
11th information practices paper CBSE INDIA 2012 2013
 
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
CBSE Class 12 Computer Science(083) Sample Question Paper 2020-21
 
FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013FP 301 OOP FINAL PAPER JUNE 2013
FP 301 OOP FINAL PAPER JUNE 2013
 
important C questions and_answers praveensomesh
important C questions and_answers praveensomeshimportant C questions and_answers praveensomesh
important C questions and_answers praveensomesh
 
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
Computer Science(083) Python Pre Board Exam 1 Sample Paper Class 12
 
FP 301 OOP FINAL PAPER
FP 301 OOP FINAL PAPER FP 301 OOP FINAL PAPER
FP 301 OOP FINAL PAPER
 
FINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEMFINAL PAPER FP304 DATABASE SYSTEM
FINAL PAPER FP304 DATABASE SYSTEM
 
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
GVKCV Computer Science(083) Pre board sample paper 2 Class 12 (20-21) with so...
 
Xiicsmonth
XiicsmonthXiicsmonth
Xiicsmonth
 
Computer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paperComputer science-2010-cbse-question-paper
Computer science-2010-cbse-question-paper
 
Computer science sqp
Computer science sqpComputer science sqp
Computer science sqp
 
Qno 1 (a)
Qno 1 (a)Qno 1 (a)
Qno 1 (a)
 
Sample paper
Sample paperSample paper
Sample paper
 
Qno 1 (f)
Qno 1 (f)Qno 1 (f)
Qno 1 (f)
 

Similaire à IP Sample paper 2 Class XI

(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
Pamidimukkala Sivani
 
Db2考试测试题
Db2考试测试题Db2考试测试题
Db2考试测试题
fm2008
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docx
gitagrimston
 
Data structure using c bcse 3102 pcs 1002
Data structure using c bcse 3102 pcs 1002Data structure using c bcse 3102 pcs 1002
Data structure using c bcse 3102 pcs 1002
SANTOSH RATH
 

Similaire à IP Sample paper 2 Class XI (20)

Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paperInformatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
Informatics practises 12th CBSE INDIA 2012-2013 MAIN EXAM paper
 
Ip xi iii_ut_14-15
Ip xi iii_ut_14-15Ip xi iii_ut_14-15
Ip xi iii_ut_14-15
 
Cbse marking scheme 2006 2011
Cbse marking scheme 2006  2011Cbse marking scheme 2006  2011
Cbse marking scheme 2006 2011
 
90 Informatics Practices.pdf
90 Informatics Practices.pdf90 Informatics Practices.pdf
90 Informatics Practices.pdf
 
CS_PQMS.pdf
CS_PQMS.pdfCS_PQMS.pdf
CS_PQMS.pdf
 
(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2(Www.entrance exam.net)-tcs placement sample paper 2
(Www.entrance exam.net)-tcs placement sample paper 2
 
Gate-Cs 1996
Gate-Cs 1996Gate-Cs 1996
Gate-Cs 1996
 
gate-Cs 2000
gate-Cs 2000gate-Cs 2000
gate-Cs 2000
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
MATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdfMATLAB Questions and Answers.pdf
MATLAB Questions and Answers.pdf
 
Gate-Cs 2010
Gate-Cs 2010Gate-Cs 2010
Gate-Cs 2010
 
Gate Previous Years Papers It2005
Gate Previous Years Papers It2005Gate Previous Years Papers It2005
Gate Previous Years Papers It2005
 
Ee693 sept2014midsem
Ee693 sept2014midsemEe693 sept2014midsem
Ee693 sept2014midsem
 
Db2考试测试题
Db2考试测试题Db2考试测试题
Db2考试测试题
 
Ec2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.orgEc2203 digital electronics questions anna university by www.annaunivedu.org
Ec2203 digital electronics questions anna university by www.annaunivedu.org
 
Doc 20180130-wa0006
Doc 20180130-wa0006Doc 20180130-wa0006
Doc 20180130-wa0006
 
ExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docxExamName___________________________________MULTIPLE CH.docx
ExamName___________________________________MULTIPLE CH.docx
 
Data structure using c bcse 3102 pcs 1002
Data structure using c bcse 3102 pcs 1002Data structure using c bcse 3102 pcs 1002
Data structure using c bcse 3102 pcs 1002
 
1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional1z0 851 exam-java standard edition 6 programmer certified professional
1z0 851 exam-java standard edition 6 programmer certified professional
 
Gate Previous Years Papers
Gate Previous Years PapersGate Previous Years Papers
Gate Previous Years Papers
 

IP Sample paper 2 Class XI

  • 1. Sample Paper 2 CLASS : XI TIME : 3Hrs. SUBJECT : INFORMATICS PRACTICES (065) M.M. 70 1.(a)What value is assigned to num in the following code fragment, when choice equals 2? 1 switch (choice) case 1: num=1; break; case 2: num=3; break; case 3: num=2; break; default: num=0; (b) How many times is the following loop executed? 1 int x=5; int y=50; while (x < 50) x=x + 10; (c) While working in NetBeans, Ms.Korpi wants to display “Pass” or “Needs to Reappear” message depending on the marks entered in jTextField. Help her to choose the more appropriate statement out ‘I statement’ and ‘Switch’ statement' 1 (d) Determine the error in the following statement: 1 int 2 = a, b = 5, c =11; d = 12; (e) What is the difference between / and % operator? 1 (f) Identify the correct answer: 5×1=5 (i) If x=300 and y=700 then what will be the output of the following expression? y – x < 500 ? 150 : 50 (a) 50 (b) 400 (c) 500 (d) 150 (ii) int a,b = 20; a = 50 % 5; b = b + a; System.out.print(a); System.out.print(b); Out put will be a) 10,30 (b) 0,20 (c) 50,20 (d)5,20
  • 2. (iii) The statement i++; equivalent to (a) i = i + i; (b) i = i + 1; (c) i = i-1; (d) i--; (iv) int a=11; int b=22; Which of the following statement is correct: (a) a >= b (b) a < b (c) a =< b (d) a > b (v) Suppose,a=5 and b=2, then value of a%b is (a) 5 (b) 2 (c) 1 (d)2.5 2.(a) Zridung wants to list the names of all the tables in his database namely Student. What command should he write at MySQL prompt to get this result? 1 (b) A table “ Book “ in a database has degree 4 and cardinality is also 4. What is the number of rows in it? 1 (c) Define Primary key in table. 1 (d) Ms Marina wants to remove the entire content of a table “CBSE” but not its structure. For this he worte following MySQL command: DELETE * FROM CBSE; Was it correct? 1 e) Mrs Lima is using table – EMP with the following columns: EMPNO, ENAME, SALARY , DOJ She wants to display all information of students in descending order of ENAME. She wrote the following MySQL query and she did not get the desired output, SELECT * FROM EMP WHERE ORDER BY ENAME DESC; Rewrite the above query to get the desired output. 1 (f) Identify the correct answer: 5×1=5 (i) Number of columns in table is called (a) Power (b) Degree (c) Cardinality (d) Design (ii) A database (a) Contains table (b) Is a part of a table (c) Is same as a table (d) None of the above (iii) DML means (a) Data Multiple Language (c) Data Monitoring Language (b) Data Matriculation Language (d) Data Manipulation Language (iv) SELECT INSTR(‘CORPORATE FLOOR’,’OR’); Result of the query is (a) 2 (b) 2,5,14 (c) 2,3 (d) None of these
  • 3. (v) POWER(m,n) returns: (a) m raised to the n th power (c) m raised to the m th power (b) n raised to the m th power (d) None of the above 3. (a) What message will be displayed after the execution of the following code? 2 int Age = 24,Relaxation=6; int ModiAge = Age- Relaxation; if (ModiAge < 18) jOptionPane.showMessageDialog(Null, “ Not Eligible”); else jOptionPane.showMessageDialog(Null, “Eligible”); (b) Rewrite the following program code using an if statement: 2 int C = jComboBox1.getSelectedIndex(); switch( C ) case 0 : FinalAmt = BillAmt; break; case 1 : FinalAmt = 0.9 * BillAmt; break; case 2 : FinalAmt = 0.8 * BillAmt; break; default : FinalAmt = BillAmt; (c) The following code has some error(s). Rewrite the correct code underlining all the corrections made: 2 int sum = 0; Int i ; for( i = 0 , I <= 5 , I ++) Sum =sum + i ; jTextArea1. showText (“ “ + sum); (d) Rewrite the following program code using a for loop: 2 int i = 1, sum = 0; do sum += i; i += 2; While( i < 10); (e) What will be the value of a and b after execution of following code; 2 int a = 1, b b = 2; if ( ++b < 50) a =a * b;
  • 4. 4. Create a table -VOTER with following structure and Insert at least four rows into it. 2+2+6=10 Filed name Date Type/size Vno Integer(4) Vname Varchar(30) Age Integer(3) Address Varchar(30) Phone Double(16) Write the SQLs for the followings: (a) To list Vno,Vname,Age for all the the voters. This information should be sorted on Vname. (b) To list all the voters where address is 'Guwahati' (c ) To add oe new column named VSex datatype char(1) . (d) To list voters where address is “Guwahati” but age not between 20 and 30. (e) To delete the records of all those voters who are either residing in “Guwhati” or whose Age <25. (f) To drop the table. 5. (i) What do mean by variable in Java? 1 (ii) What is the purpose of if statement in Java? Describe different forms of if statement. 2 (iii) What is the use of while loop in Java ? Explain with one example. 2 (iv) Name one DML command of MySQL. 1 (v) Describe the syntax of CREATE TABLE command . 2 (vi) A numeric data field COUNTER stores a value 35675.8765. Write a command to round off Counter to (a) Whole number (b) Upto 3 decimal places 2
  • 5. 6. (i) Write a Java Desktop application to check whether the number is even or odd. 3 (ii) Write a program to calculate commission for the salesman. The commission is calculated according to following rates: Sales Commission Rate 5001-12000 3% 12001-15099 5% 16000-19999 7% Above 20000 10% The program accepts the sales made by the salesman and displays the calculated commission. 4 (iii) Write a Java Desktop application to find the factorial of an integer 3
  • 6. 7 . Write SQL Commands for (a) to (e) and write the outputs for (f) on the basis of the following table : Table : FURNITURE NO ITEM NAME TYPE DATEOFSTOC K PRICE DISCOUN T 1 White Lotus Double Bed 2002-02-23 3000 25 2 Pink feathers Baby Cot 2002-01-29 7000 20 3 Dolphin Baby Cot 2002-02-19 9500 20 4 Decent Office Table 2002-02-01 25000 30 5 Comfort zone Double Bed 2002-02-12 25000 30 6 Donald Baby cot 2002-02-24 6500 15 7 Royal Finish Office Table 2002-02-20 18000 30 8 Royal tiger Sofa 2002-02-22 31000 30 9 Econo sitting Sofa 2001-12-13 9500 25 10 Eating Paradise Dinning Table 2002-12-19 11500 25 (a) To list the type and price which dateofstock between 2002-02-15 to 2002-02-28. 1 (b)To change the price of all furniture by adding another Rs. 1000 to their price whose type is sofa. 1 (c)To delete the record of all item where discount is 30. 1 (d) To display the price of Royal tiger. 1 (e) To list item name, type and price all items whose names ended with f. 1 (f) Give the output of following SQL statement : 1×5=5 (i) SELECT DISTINCT (TYPE) FROM FURNITURE; (ii) SELECT ITEM,TYPE FROM FURNITURE WHERE DISCOUNT>25; (iii) SELECT ITEM,TYPE,PRICE FROM FURNITURE WHERE TYPE=”BABY COT”; (iv) SELECT PRICE FROM FURNITURE WHERE DATEOFSTOCK < ’2002-02-12’; (v) SELECT INSTR(ITEM,’S’) FROM FURNITURE;