SlideShare una empresa de Scribd logo
1 de 3
Descargar para leer sin conexión
Sample Paper 1
SUB: COMPUTER SCIENCE
CLASS XI
Time: 3Hrs Marks: 70
Q1. a. What is meant by pretty printing? 1
b. What do you mean by Syntax error,run time errors, semantic errors explain with eg.3 c.
In the following code, what will be the possible output from the following options
i to iv ?Justify the answer. 2
#
include<iostream.h>
#include<conio.h>
#include<stdlib.h>
const int LIMIT=5;
void main()
{
randomize (
); int Points;
Points=100 + random (LIMIT);
for(int P=100;P<=Points;
P++) cout<<P<<”#”;
cout<<endl;
}
i) 103#102#101#100#
ii) 100#101#102#103#
iii) 100#101#103#102#104#
iv) 104#103#102#101#100#
e. Find the output of the following code snippet. 2
#include <iostream.h>
void main()
{
long num = 123543211, result =0,
digit; do {
digit = num %
10; result + =
digit; num /= 10;
} while (num ! =0);
cout << “output =” << result++ << endl;
}
Q2. a. List the problem solving methodology and techniques in programming. 1
b . What are the different types of Documentation explain with eg? 2
c. Write the characteristics of a good program. 2
d. Explain the stages of program Development Process. 2
Q3. a. Mention the header files for the following built in functions. 2
a) getche() b) setw() c) puts() d) atoi ()
b. Find the errors in the following statements?
4. cin>>b>>’n’;i. const int z; ii. char ch=z; 3. long float x; 2
c. Evaluate the following, where a, b, c are integers and d, f are floating point
numbers. The value of a=10, b=5 and d=6.5
(i) f = a * b + a/b
(ii) c = d+a + b % a+ ++a
d. What is encapsulation? Explain the concept with the help of an example. 2
e. What is the output of the following? 3
i) # include<iostream.h>
void main ( )
{
int ch=30;
cout << ++ch <<”n”<< ch<<”n”<<++ch;
}
1) What output does the above code fragment produce?
Q4. a. What is type casting explain with eg 2
b. compare while with dowhile loop with eg
c. convert the following as directed (complete the source code) 2 x 2=4
i. if-else to switch statement
int x,y,z;
cin>>x>>y>>z;
if (x==1)
cout<<x*y+5;
else if (x==2)
cout<<x+2+y;
else if (x==3)
{
z=(x*y*6)/3;
cout<<z;}
else cout<<x<<’ ‘<<y<<’ ‘<<z;
ii. convert for to do while loop
for(i=1;i<=n;i++)
{
If(n%i==0)
Cout<<i<< ;
Cout<< End of loop ;
}
Q5. a. Explain the following terms: 6
Define tokens, identifier, keywords, literals, variable and function with eg
b. Write short note on. 6
1. Comparison if else and switch case statement.
2. array and structure
3. break and continue.
c. Explain fundamental and derived data types? 2
d. Explain the use of relational operators with truth table and example. 3
Q6. 2
a/ Wap to input 2matrices and multiply them
b. Write a program using structures to store the information of the employees and count
number of employees having salary between 5000 and 15000. Details of employees include
eno,enm,salary. 3
c. Write a program to read a matrix of order 3 x 3 and do the following 3
convert it to 1d array of size 9
d. Write a C++ program using function to find the sum of both diagonal elements
separately 4
Q7.
a. Differentiate between call by value and call by reference with help of an example. 3
b. Write a program to illustrate the swapping of two values using call by 2
Reference method.
c. what is difference between function returning a value and void functions 2

Más contenido relacionado

La actualidad más candente (20)

C questions
C questionsC questions
C questions
 
programming in C++ report
programming in C++ reportprogramming in C++ report
programming in C++ report
 
Revision1 C programming
Revision1 C programmingRevision1 C programming
Revision1 C programming
 
Programs of C++
Programs of C++Programs of C++
Programs of C++
 
Revision1schema C programming
Revision1schema C programmingRevision1schema C programming
Revision1schema C programming
 
Qno 1 (f)
Qno 1 (f)Qno 1 (f)
Qno 1 (f)
 
C++ Programming - 1st Study
C++ Programming - 1st StudyC++ Programming - 1st Study
C++ Programming - 1st Study
 
ARIC Team Seminar
ARIC Team SeminarARIC Team Seminar
ARIC Team Seminar
 
PECCS 2014
PECCS 2014PECCS 2014
PECCS 2014
 
Qno 1 (d)
Qno 1 (d)Qno 1 (d)
Qno 1 (d)
 
Xiicsmonth
XiicsmonthXiicsmonth
Xiicsmonth
 
Technical aptitude test 2 CSE
Technical aptitude test 2 CSETechnical aptitude test 2 CSE
Technical aptitude test 2 CSE
 
6th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
6th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...6th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
6th Semester (Dec-2015; Jan-2016) Computer Science and Information Science En...
 
CS Sample Paper 1
CS Sample Paper 1CS Sample Paper 1
CS Sample Paper 1
 
Codejunk Ignitesd
Codejunk IgnitesdCodejunk Ignitesd
Codejunk Ignitesd
 
Ramco Sample Paper 2003
Ramco  Sample  Paper 2003Ramco  Sample  Paper 2003
Ramco Sample Paper 2003
 
project report in C++ programming and SQL
project report in C++ programming and SQLproject report in C++ programming and SQL
project report in C++ programming and SQL
 
Technical aptitude Test 1 CSE
Technical aptitude Test 1 CSETechnical aptitude Test 1 CSE
Technical aptitude Test 1 CSE
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
Mouse programming in c
Mouse programming in cMouse programming in c
Mouse programming in c
 

Similar a Class xi sample paper (Computer Science)

54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101premrings
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyGrejoJoby1
 
please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...hwbloom27
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_papervandna123
 
Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)Syed Umair
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFTimur Safin
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfVedant Gavhane
 
12th information Practices multiple choice questions CBSE INDIA
12th information Practices multiple choice questions CBSE INDIA12th information Practices multiple choice questions CBSE INDIA
12th information Practices multiple choice questions CBSE INDIAHarish Gyanani
 
Solved Practice Problems For the C++ Exams
Solved Practice Problems For the C++ ExamsSolved Practice Problems For the C++ Exams
Solved Practice Problems For the C++ ExamsMuhammadTalha436
 

Similar a Class xi sample paper (Computer Science) (20)

54602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee0108310154602399 c-examples-51-to-108-programe-ee01083101
54602399 c-examples-51-to-108-programe-ee01083101
 
C++ in 10 Hours.pdf.pdf
C++ in 10 Hours.pdf.pdfC++ in 10 Hours.pdf.pdf
C++ in 10 Hours.pdf.pdf
 
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo JobyC++ and OOPS Crash Course by ACM DBIT | Grejo Joby
C++ and OOPS Crash Course by ACM DBIT | Grejo Joby
 
C++ file
C++ fileC++ file
C++ file
 
C++ file
C++ fileC++ file
C++ file
 
C++ file
C++ fileC++ file
C++ file
 
please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...please sir i want to comments of every code what i do in eachline . in this w...
please sir i want to comments of every code what i do in eachline . in this w...
 
Managing console
Managing consoleManaging console
Managing console
 
2014 computer science_question_paper
2014 computer science_question_paper2014 computer science_question_paper
2014 computer science_question_paper
 
Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)Assignement of programming & problem solving u.s ass.(1)
Assignement of programming & problem solving u.s ass.(1)
 
Review version 4
Review version 4Review version 4
Review version 4
 
Go vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoFGo vs C++ - CppRussia 2019 Piter BoF
Go vs C++ - CppRussia 2019 Piter BoF
 
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdfLDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
LDCQ paper Dec21 with answer key_62cb2996afc60f6aedeb248c1d9283e5.pdf
 
Lập trình C
Lập trình CLập trình C
Lập trình C
 
UNIT 2 LOOP CONTROL.pptx
UNIT 2 LOOP CONTROL.pptxUNIT 2 LOOP CONTROL.pptx
UNIT 2 LOOP CONTROL.pptx
 
12th information Practices multiple choice questions CBSE INDIA
12th information Practices multiple choice questions CBSE INDIA12th information Practices multiple choice questions CBSE INDIA
12th information Practices multiple choice questions CBSE INDIA
 
C++ practical
C++ practicalC++ practical
C++ practical
 
901131 examples
901131 examples901131 examples
901131 examples
 
Solved Practice Problems For the C++ Exams
Solved Practice Problems For the C++ ExamsSolved Practice Problems For the C++ Exams
Solved Practice Problems For the C++ Exams
 
Asssignment2
Asssignment2 Asssignment2
Asssignment2
 

Class xi sample paper (Computer Science)

  • 1. Sample Paper 1 SUB: COMPUTER SCIENCE CLASS XI Time: 3Hrs Marks: 70 Q1. a. What is meant by pretty printing? 1 b. What do you mean by Syntax error,run time errors, semantic errors explain with eg.3 c. In the following code, what will be the possible output from the following options i to iv ?Justify the answer. 2 # include<iostream.h> #include<conio.h> #include<stdlib.h> const int LIMIT=5; void main() { randomize ( ); int Points; Points=100 + random (LIMIT); for(int P=100;P<=Points; P++) cout<<P<<”#”; cout<<endl; } i) 103#102#101#100# ii) 100#101#102#103# iii) 100#101#103#102#104# iv) 104#103#102#101#100# e. Find the output of the following code snippet. 2 #include <iostream.h> void main() { long num = 123543211, result =0, digit; do { digit = num % 10; result + = digit; num /= 10; } while (num ! =0);
  • 2. cout << “output =” << result++ << endl; } Q2. a. List the problem solving methodology and techniques in programming. 1 b . What are the different types of Documentation explain with eg? 2 c. Write the characteristics of a good program. 2 d. Explain the stages of program Development Process. 2 Q3. a. Mention the header files for the following built in functions. 2 a) getche() b) setw() c) puts() d) atoi () b. Find the errors in the following statements? 4. cin>>b>>’n’;i. const int z; ii. char ch=z; 3. long float x; 2 c. Evaluate the following, where a, b, c are integers and d, f are floating point numbers. The value of a=10, b=5 and d=6.5 (i) f = a * b + a/b (ii) c = d+a + b % a+ ++a d. What is encapsulation? Explain the concept with the help of an example. 2 e. What is the output of the following? 3 i) # include<iostream.h> void main ( ) { int ch=30; cout << ++ch <<”n”<< ch<<”n”<<++ch; } 1) What output does the above code fragment produce? Q4. a. What is type casting explain with eg 2 b. compare while with dowhile loop with eg c. convert the following as directed (complete the source code) 2 x 2=4 i. if-else to switch statement int x,y,z; cin>>x>>y>>z; if (x==1) cout<<x*y+5; else if (x==2) cout<<x+2+y; else if (x==3) {
  • 3. z=(x*y*6)/3; cout<<z;} else cout<<x<<’ ‘<<y<<’ ‘<<z; ii. convert for to do while loop for(i=1;i<=n;i++) { If(n%i==0) Cout<<i<< ; Cout<< End of loop ; } Q5. a. Explain the following terms: 6 Define tokens, identifier, keywords, literals, variable and function with eg b. Write short note on. 6 1. Comparison if else and switch case statement. 2. array and structure 3. break and continue. c. Explain fundamental and derived data types? 2 d. Explain the use of relational operators with truth table and example. 3 Q6. 2 a/ Wap to input 2matrices and multiply them b. Write a program using structures to store the information of the employees and count number of employees having salary between 5000 and 15000. Details of employees include eno,enm,salary. 3 c. Write a program to read a matrix of order 3 x 3 and do the following 3 convert it to 1d array of size 9 d. Write a C++ program using function to find the sum of both diagonal elements separately 4 Q7. a. Differentiate between call by value and call by reference with help of an example. 3 b. Write a program to illustrate the swapping of two values using call by 2 Reference method. c. what is difference between function returning a value and void functions 2