COMPUTER SCIENCE (083)

Similar documents
COMPUTER SCIENCE (083)

Split up Syllabus (Session )

I SEMESTER EXAM : : XI :COMPUTER SCIENCE : MAX MARK a) What is the difference between Hardware and Software? Give one example for each.

BRAIN INTERNATIONAL SCHOOL. Term-I Class XI Sub: Computer Science Revision Worksheet

CLASS-XI COMPUTER SCIENCE

AIR FORCE SCHOOL,BAMRAULI COMPUTER SCIENCE (083) CLASS XI Split up Syllabus (Session ) Contents

BLUE PRINT SUBJECT: - COMPUTER SCIENCE(083) CLASS-XI. Unit Wise Marks

CAMBRIDGE SCHOOL, NOIDA ASSIGNMENT 1, TOPIC: C++ PROGRAMMING CLASS VIII, COMPUTER SCIENCE

ASSIGNMENT CLASS-11 COMPUTER SCIENCE [C++]

Sample Paper Class XI Subject Computer Sience UNIT TEST II

WT I (SET-I) Date: Class XI Sec. Time: 1 Hr. 10 min. Computer Science M.M.: 30

CHAPTER 4 FUNCTIONS. 4.1 Introduction

KENDRIYA VIDYALAYA SANGATHAN, GUWAHATI REGION HALF-YEARLY EXAMINATION-2015 CLASS XI : COMPUTER SCIENCE Time Allotted : 3 hrs. Max.

Name :. Roll No. :... Invigilator s Signature : INTRODUCTION TO PROGRAMMING. Time Allotted : 3 Hours Full Marks : 70

3. Functions. Modular programming is the dividing of the entire problem into small sub problems that can be solved by writing separate programs.

BRAIN INTERNATIONAL SCHOOL Term-II Class-XI Sub:- Computer Science Revision Sheet

2. Distinguish between a unary, a binary and a ternary operator. Give examples of C++ operators for each one of them.

b) #include<iostream.h> void main() { int a, b; cout<<"input two integer values? "; cin>>a>>b; double avg=(a+b)/2.0; cout<<"average="<<avg<<endl; }

Creating a C++ Program

UNIT- 3 Introduction to C++

SBOA SCHOOL & JUNIOR COLLEGE, CHENNAI 101 COMPUTER SCIENCE CLASS: XI HALF YEARLY EXAMINATION MAX MARKS:70 CODE - A DURATION : 3 Hours

COMPUTER SCIENCE 1998 (Delhi Board)

I Mid Semester May 2012 : Class XII : Computer Science Max Mark 50 : Time 2 Hrs. 1. a) What is macro in C++? Give example 2

Companion C++ Examples

POINTERS. Pointer is a memory variable which can store address of an object of specified data type. For example:

SPLIT UP SYLLABUS SUBJECT : COMPUTER SCIENCE (083) SESSION: Class XI (Theory) C++ Duration: 3 hours Total Marks: 70

Object Oriented Pragramming (22316)

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE CLASS XI

m) sin() n) endl o) getch() p) cout

D.A.V PUBLIC SCHOOLS, RANCHI ZONE FIRST SUMMATIVE ASSESSMENT CLASS - XI COMPUTER SCIENCE

1. Answer the following : a) What do you mean by Open Source Software. Give an example. (2)

C++ Final Exam 2017/2018

CHAPTER 3 Expressions, Functions, Output

o Counter and sentinel controlled loops o Formatting output o Type casting o Top-down, stepwise refinement

CSC 126 FINAL EXAMINATION Spring Total Possible TOTAL 100

Sample Paper Class XII SUBJECT : COMPUTER SCIENCE

PART I. Part II Answer to all the questions 1. What is meant by a token? Name the token available in C++.



KENDRIYA VIDYALAYA PANGODE MONTHLY TEST I JUNE 2015 CLASS XII COMPUTER SCIENCE Time allowed: 1 1/2 Hours Max. Marks: 50

Introduction to Algorithms and Programming (COMP151)

DELHI PUBLIC SCHOOL TAPI

cast.c /* Program illustrates the use of a cast to coerce a function argument to be of the correct form. */

C++ PROGRAMMING SKILLS Part 4: Arrays

Multiple Choice Questions ( 1 mark)

Computer Department. Question (1): State whether each of the following is true or false. Question (2): Select the correct answer from the following:

AHLCON PUBLIC SCHOOL, MAYUR VIHAR I, DELHI ASSIGNMENT CLASS XI Session Chapter 1: Computer Overview

VARIABLE, OPERATOR AND EXPRESSION [SET 1]

Programming. C++ Basics

WARM UP LESSONS BARE BASICS

I BCS-031 BACHELOR OF COMPUTER APPLICATIONS (BCA) (Revised) Term-End Examination. June, 2015 BCS-031 : PROGRAMMING IN C ++

The University of Nottingham

a data type is Types

CS 1044 Programming in C++ Test 1 READ THIS NOW! Failure to read and follow the instructions below may result in severe penalties.

Study Guide for Test 2

16. What is the significance of the break statement in a switch block?

void Add() { cin >> trainnumber; gets(trainname); } void display() { cout<<trainnumber <<":"<<TrainName<<end;

Fundamentals of Programming CS-110. Lecture 2

READ THIS NOW! Do not start the test until instructed to do so!

Subject: PROBLEM SOLVING THROUGH C Time: 3 Hours Max. Marks: 100

Programming Fundamentals. With C++ Variable Declaration, Evaluation and Assignment 1

C++ for Java Programmers

LAB 4.1 Relational Operators and the if Statement

Computer Science XII Important Concepts for CBSE Examination Questions

Basic program The following is a basic program in C++; Basic C++ Source Code Compiler Object Code Linker (with libraries) Executable

Few reminders and demos

Scheme G. Sample Test Paper-I. Course Name : Computer Engineering Group Course Code : CO/CD/CM/CW/IF Semester : Second Subject Tile : Programming in C

MEHRAN UNIVERSITY OF ENGINEERING AND TECHNOLOGY, JAMSHORO. FIRST TERM FIRST YEAR (1 ST TERM) B.E.(ELECTRICAL) REGULAR EXAMINATION 2009 OF 09-BATCH.

Data type of a pointer must be same as the data type of the variable to which the pointer variable is pointing. Here are a few examples:

CSci 1113 Midterm 1. Name: Student ID:

CLASS XII GUESS PAPER COMPUTER SCENCE (083)

Class 2: Variables and Memory. Laura Marik Spring 2012 C++ Course Notes (Provided by Jason Minski)

Chapter 1. Computer Overview

Downloaded S. from Kiran, PGT (CS) KV, Malleswaram STRUCTURES. Downloaded from

1- Write a single C++ statement that: A. Calculates the sum of the two integrates 11 and 12 and outputs the sum to the consol.

Functions in C++ Problem-Solving Procedure With Modular Design C ++ Function Definition: a single

The Hyderabad Public School, Begumpet, Hyderabad, A.P

Name :. Roll No. :... Invigilator s Signature :.. CS/B.TECH (NEW)/SEM-2/CS-201/ BASIC COMPUTATION & PRINCIPLES OF COMPUTER PROGRAMMING

UNIT-2 Introduction to C++

READ THIS NOW! Failure to read and follow the instructions below may result in severe penalties. Do not start the test until instructed to do so!

Arrays. int Data [8] [0] [1] [2] [3] [4] [5] [6] [7]

CS201- Introduction to Programming Latest Solved Mcqs from Midterm Papers May 07,2011. MIDTERM EXAMINATION Spring 2010

Getting started with C++ (Part 2)

Selection Control Structure CSC128: FUNDAMENTALS OF COMPUTER PROBLEM SOLVING


2.1-First.cpp #include <iostream> // contains information to support input / output using namespace std;

Introduction to Programming EC-105. Lecture 2

A function is a named group of statements developed to solve a sub-problem and returns a value to other functions when it is called.

SAMPLE PAPER 2015 SUB - COMPUTER SCIENCE - (Theory) CLASS XII Time allowed: 3 hours Maximum marks: 70

CPE Summer 2015 Exam I (150 pts) June 18, 2015

Page. No. 1/15 CS201 Introduction to Programmming Solved Subjective Questions From spring 2010 Final Term Papers By vuzs Team

COMP 250: Java Programming I. Carlos G. Oliver, Jérôme Waldispühl January 17-18, 2018 Slides adapted from M. Blanchette

Kapi ap l S e S hgal P T C p t u er. r S. c S ienc n e A n A k n leshw h ar ar Guj u arat C C h - 8

ADARSH VIDYA KENDRA NAGERCOIL COMPUTER SCIENCE. Grade: IX C++ PROGRAMMING. Department of Computer Science 1

Programming in C++ The manager of a company. Lecture Notes 6. Functions (Procedures) 4/24/2018. he he he. Does Does Does

(4) Find the syntax error(s), if any, in the following program: #include main() int x[5],*y,z[5]; for(i=0;i<5;i++) x[i]=i; z[i]=i+3; y=z; x=y; (5) Rew

There are algorithms, however, that need to execute statements in some other kind of ordering depending on certain conditions.

SECTION A [Only for candidates, who opted for C++]

1. a) What #include statement do you put at the top of a program that does uses cin, cout or endl?

EAS230: Programming for Engineers Lab 1 Fall 2004

Transcription:

Roll No. Code : 112011-083-A Please check that this question paper contains 7 questions and 6 printed pages. CLASS-XI COMPUTER SCIENCE (083) Time Allowed : 3 Hrs. Maximum Marks : 70 General Instructions : (i) All the questions are compulsory. (ii) The paper contains 7 questions. (iii) Programming language used : C++ (iv) 15 minutes time has been allotted to read this question paper. During this time, the student will read the question paper only, he/she will not write any answer on the answer book during this period. 1. (a) What is the difference between compiler and interpreter? 2 (b) Name any two Antivirus Software. 1 (c) Convert the following : (1 4=4) (i) (145) 10 =(?) 2 (ii) (1011.101) 2 = (?) 8 (iii) (2A5) 16 = (?) 2 (iv) (241) 8 = (?) 10 (d) What is the difference between RAM and ROM? (One difference) 1 (e) Pen Drive is New Age Memory. Explain how it works? 1 (f) Arrange the following units of storage in descending order : 1 TB KB GB MB 2. (a) What is bug in a program? 1 (b) How comments are given in a C++ program? 1 (c) Select correct identifiers from the list given below : 1 (i) Income_Tax (ii) S.I. (iii) 2code (iv) break (v) AGE (d) What is meant by program maintenance? 1 (e) What is the difference between an entry controlled loop and an 2 exit controlled loop? Explain giving an example. CSc 1

(f) What is the purpose of indentation? Indent the following program : 2 # include <iostream.h> void main() int i; for (i=0; i<20; i++) cout <<i; cout << endl; (g) Differentiate between syntax errors and run time errors. Explain 2 giving one example each. 3. (a) Suppose x1 and x2 are two integer type variables. Add x1 and x2 and 1 assign to a long type variable. Construct a C++ statement for doing the same. (b) How many bytes of memory is allocated to a and b, if a and b are 1 declared as below : signed int a; long b; (c) Differentiate between : 1 int val = 10; and const int val = 10; (d) What is the difference between x=3 and x = = 3? 1 (e) Name the header files to which the following functions belong : 2 (i) strlen ( ) (ii) setw ( ) (iii) sqrt ( ) (iv) tolower ( ) (f) Why is main function special? What would happen if main function is not present in the program? 2 (g) What is Explicit type casting? Explain giving example. 2 (h) Evaluate the following expressions : 2 (i) 4 * 5 + 7 * 2 8 % 3 + 4 (ii) (x>=y) & & (x + y) > x if x=9 and y=9 (i) Give output of the following program segments : 3 (i) int time, rate; cin >> time; rate=time>2? 7 : 6 ; cout <<rate; assume time given as input is 5 years (ii) char ch = B ; int x = ch; x++; cout << x << \n << ch; (iii) int a = 10, b = 1.5, c; c = (a++) * b + a; cout << c= <<c<<endl ; cout << a= <<a ; CSc 2

4. (a) Topshop offers incentive to its members in the form of special discount. 3 Discount is offered on the basis of bill amount as per the following criteria : Bill Amount Discount Less than 2000 5% >=2000 and <4000 10% >=4000 and <6000 15% 6000 and above 20% Write a program/function which accepts bill amount and membership number as input and calculates amount payable i.e., (Bill Amount discount) and prints it. (b) Give the output of the following program segment : 2 char Iname [50] = CommonWealth2010 ; for (int i=0; i <strlen (Iname) ; i +=2) if (isalpha (Iname [i] ) ) Iname [i] = toupper ( Iname [i] ) ; else Iname [i] = Iname [i] + 1 ; puts (Iname) ; (c) Consider the following program code. Select the expected output from the options (i) to (iv). Also justify your answer. 2 # include <iostream.h> # include <stdlib.h> void main ( ) randomize () ; int x; x = random (3) + 1; for (int i = 0 ; i<=x ; ++i) cout << i << ; (i) 0 1 2 3 4 (ii) 1 2 3 4 5 (iii) 2 3 4 5 (iv) 0 1 2 3 (d) Write a function that takes an integer type variable as parameter and prints the pattern as shown in the example : 3 Example Input : 5 Output : 1 22 333 4444 55555 CSc 3

5. (a) Give the output of the following program : 2 #include <iostream.h> int x=10; void change (int a, int & b, int c) a=a+b; b=b+c; c=c+a; cout << a << \t << b << \t << c; void main () int x = 5, y = 10; change (x, y, : : x) ; cout << \n <<: :x<< \t <<x<< \t <<y; (b) Write a function odd_product () that takes array list and its 4 size as parameter and prints the product of all odd values present in the array. Example : Input : Array is 3 4 6 12 6 7 5 2 6 size is 9 Output : Product of 3 7 5 = 105 (c) Write a function in C++ to print the sum of all the elements except 3 left diagonal elements of 3 3 matrix. Example Input : Array is 3 4 6 1 5 7 2 4 8 Output : Sum of matrix except left diagonal elements is 24 (i.e., 4+6+1+7+2+4=24) 6. (a) Consider the following program segment : 2 #define AREA(a) a*a void area(int a) return a*a; CSc 4

void main() cout<<area(5+2)<<endl; // Statement 1 cout<< AREA(5+2)<<endl // Statement 2 What will be the difference between output from statement 1 and statement 2? Explain. (b) Rewrite the following program after correcting the error(s), if 2 any. Also underline the corrections made. # include<iostream.h> void Assign (int, int) ; int main ( ) present=25, past=35 ; Assign (present ; past) ; Assign (past) ; getch () ; void Assign (int argl, int arg2=20) argl=argl + arg2 cout << arg1>>arg2 ; (c) Rewrite the following code using switch case statement : 3 char code ; int x, y, z ; cin>>code; if (code= = A ) cout<< Accountant ; else if (code= = C code= = G ) cout << Grade IV ; else if (code = = F ) cout<< Financial Adviser <<endl; else cout << Wrong code ; (d) Rewrite the following using while loop 3 int n=15, sume=0 ; for (int i=2 ; i<=n ; i=i+2) if (i % 3 == 0) sume + = i ; CSc 5

7. (a) What will be the output of the following code : 2 struct Item int I_ no ; char I_name [20] ; float I_price ; int I_qty ; ; void main () Item S [4] = 1, Bread, 11.0, 20, 2, Butter, 25.0, 40, 3, Cream, 65, 15, 4, Jam, 95.5, 20 ; cout<<s [0]. I_no ; cout<<s [1]. I_name [3] ; cout<<s [2]. I_qty ; cout<<s [3]. I_name ; (b) Declare a structure time that contains two members- hours and 4 minutes of type integer. Write a function add_time( ) that takes two time as parameters and displays the sum of time (total time). Example Input : time1 Hrs=2 Minutes = 54 Input : time2 Hrs=5 Minutes = 20 Output : Total Time : 8 hrs 14 minutes Note : Assuming minutes given as input are less than 60 as shown in the example. CSc 6