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

Similar documents
Object Oriented Programming Using C++ Mathematics & Computing IET, Katunayake

CHAPTER 2.2 CONTROL STRUCTURES (ITERATION) Dr. Shady Yehia Elmashad

ASSIGNMENT CLASS-11 COMPUTER SCIENCE [C++]

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

Sample Paper Class XI Subject Computer Sience UNIT TEST II

3/12/2018. Structures. Programming in C++ Sequential Branching Repeating. Loops (Repetition)

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

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

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

University of Dublin

Programming Fundamentals

COMPUTER SCIENCE (083)

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.

1st Midterm Exam: Solution COEN 243: Programming Methodology I

CSci 1113 Midterm 1. Name: Student ID:

Name Section: M/W T/TH Number Definition Matching (8 Points)

Programming Language. Control Structures: Selection (switch) Eng. Anis Nazer First Semester

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible)

CS 201 (Intro. to Computing) Fall 2015 Sabancı University Sample Questions for Midterm 1

Computer Programming : C++

b) Give the output of the following program: 6,70,70 2,70 210,282,59290

CSCE Practice Midterm. Data Types

LAB 4.1 Relational Operators and the if Statement

Multiple Choice (Questions 1 14) 28 Points Select all correct answers (multiple correct answers are possible)

CPT101- Principles of Programming

Write a program that displays all the even integers between 1 and 100, inclusive

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible)

CPE 112 Spring 2015 Exam II (100 pts) March 4, Definition Matching (8 Points)

Data Types. 9. Types. a collection of values and the definition of one or more operations that can be performed on those values

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

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

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

Name Section: M/W T/TH Number Definition Matching (6 Points)

C++ Final Exam 2017/2018

Multiple Choice (Questions 1 14) 28 Points Select all correct answers (multiple correct answers are possible)

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

CMPE Experiment 3 Selective Structures

(c) ((!(a && b)) == (!a!b)) TRUE / FALSE. (f) ((!(a b)) == (!a &&!b)) TRUE / FALSE. (g) (!(!a) && (c-d > 0) && (b!b))

INTRODUCTION TO COMPUTER SCIENCE - LAB

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

CSCE Practice Midterm. Data Types

Computer Programming. Decision Making (2) Loops

Topics: Material through example 19 (types, operators, expressions, functions, selection, loops, arrays)

CHAPTER 4 FUNCTIONS. 4.1 Introduction

Score score < score < score < 65 Score < 50

PROGRAMMING IN C LAB MANUAL FOR DIPLOMA IN ECE/EEE

COMPUTER SCIENCE (083)

Laboratory 0 Week 0 Advanced Structured Programming An Introduction to Visual Studio and C++

The following expression causes a divide by zero error:

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

CLASS-XI COMPUTER SCIENCE

DHA Suffa University CS 103 Object Oriented Programming Fall 2015 Lab #01: Introduction to C++

VOLUME II CHAPTER 9 INTRODUCTION TO C++ HANDS ON PRACTICE PROGRAMS

By the end of this section you should: Understand what the variables are and why they are used. Use C++ built in data types to create program

WARM UP LESSONS BARE BASICS

Chapter 1 INTRODUCTION

REPETITION CONTROL STRUCTURE LOGO

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

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

BEng (Hons) Electronic Engineering. BEng (Hons) Telecommunications. Examinations for / Semester 2

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

Programming Language. Control Structures: Repetition (while) Eng. Anis Nazer Second Semester

Name SECTION: 12:45 2:20. True or False (12 Points)

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

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

Superior University. Department of Electrical Engineering CS-115. Computing Fundamentals. Experiment No.6

Superior University. Department of Electrical Engineering CS-115. Computing Fundamentals. Experiment No.1

Creating a C++ Program

CSCE 110 Dr. Amr Goneid Exercise Sheet (7): Exercises on Recursion

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

LECTURE NOTES ON PROGRAMMING FUNDAMENTAL USING C++ LANGUAGE

CPE 112 Spring 2015 Exam III (100 pts) April 8, True or False (12 Points)

INDIAN SCHOOL SOHAR FIRST TERM EXAM ( ) INFORMATICS PRACTICES

Other operators. Some times a simple comparison is not enough to determine if our criteria has been met.

Add Subtract Multiply Divide

M4.1-R3: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE

Definition: Data Type A data type is a collection of values and the definition of one or more operations on those values.

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK XII COMPUTER SCIENCE ARRAY AND STRUCTURES

C++ PROGRAMMING SKILLS Part 2 Programming Structures

Dept. of CSE, IIT KGP

Study Guide for Test 2

MODULE 2: Branching and Looping

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; }

Control Statements. If Statement if statement tests a particular condition

FORM 1 (Please put your name and form # on the scantron!!!!) CS 161 Exam I: True (A)/False(B) (2 pts each):

5. Assuming gooddata is a Boolean variable, the following two tests are logically equivalent. if (gooddata == false) if (!

GE U111 Engineering Problem Solving & Computation Lecture 6 February 2, 2004

Chapter 1. Computer Overview

Chapter 3. More Flow of Control. Copyright 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley

Lab Instructor : Jean Lai

Chapter 01 Arrays Prepared By: Dr. Murad Magableh 2013

Exam I Review Questions Fall 2010

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

while for do while ! set a counter variable to 0 ! increment it inside the loop (each iteration)

A SHORT COURSE ON C++

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

Review: Exam 1. Your First C++ Program. Declaration Statements. Tells the compiler. Examples of declaration statements

A First Program - Greeting.cpp

CSCE 110 Dr. Amr Goneid Exercise Sheet (7): Exercises on Recursion (Solutions)

St. Teresa School A Temple of Learning Shakti Khand II, Indirapuram, Ghaziabad Holiday Assignment ( ) Class: XI

Transcription:

I SEMESTER EXAM : : XI :COMPUTER SCIENCE : MAX MARK 70. a) What is the difference between Hardware and Software? Give one example for each. b) Give two differences between primary and secondary memory. c) What is the use of operating system?. a) Convert the following expression into C++ expression : - i) b - 4 ac ii) x divisible by 9 and divisible by 8 b) Consider the following program segment and rewrite the program using switch -case statements. char category ; cin >> category ; if (category = = A ) if (category = = B ) cout << \n Group B ; if (category = = C ) cout << \n Group C ; cout << \n Group B ; cout<< Grade NIL ; c) Convert the following for loop into its equivalent while loop. for(int i=5; i >= ; i- -) cout<<i<< \n ; cout<< Over ; d) Convert the following while loop into its equivalent for. loop. int i=0,sum=0; while ( j < = 5 ) sum + = j ; j + = ;

e) Rewrite the following switch statement with if.. statement char direction ; cin>>direction ; switch(direction) case E : cout<< EAST ; case W : cout<< WEST ; case S : cout<< SOUTH ; case N : cout<< NORTH ;. a) Evaluate the following Boolean expression. a>c+b && ( a+c<d b+d >= a+c ) if a=4, b=, c=5 and d=. b) Give the output of the following program. int A = 7, B = 9 ; cout << ++A ; cout <<, ; cout << A++; cout << B-- <<, << --B; c) Evaluate the following :- x= a%b a* +b/a +0 where a=0 and b= d) Give the output of the following program segment:- void main() cout<< it is \train \to \new Delhi ; e) Give the output of the following program segment:- long n=456; int s=0, p=0; int x = n % 0; if ( x % == 0) p + = x * x * x; s + = x * x; n /= 0; cout << s <<, << p <<, << n << endl;

f) Give the output of the following program segment:- int a = 0, b =, c =, d =, e = 4, k = 0 ; while ( k < = 5) switch ( ++k ) case : a ++ ; case : b++ ; case : break case 4 : c + = ; case 5 : d ++; default : e- -; cout <<a <<","<< b<<","<< c <<","<< d<<"," << e<<"," << k ; g) Give the output of the following program segment:- void main( ) int j = 0 ; for(int i=0 ; i >=0 ; i+=) j + = i/; cout<<j<< ; h) Give the output of the following : - int i = 0, n = 0, sum = 0 ; do sum + = n + i i+= ; n - - ; while(i < = n); cout<<i<< <<n << " "<< sum ; 4. a) Rewrite the following program after removing the syntax error. x int ; float a, double b ; cin ( a, b ); x = a + b ; cout >> a >> b >> x ;

b) Rewrite the following program after removing the syntax error. int n, total = 0 ; cin >> n ; for ( int i = 0, i < n, i ++ ) j = ; do if j % = = 0 total + = j; j++; while (j <4 ) 5. a) Consider the following program and find required header files to execute the program. void main( ) int a, ch ; cin>> a >> ch ; cout<< a << ch ; getch ( ) ; b) An operator is used in between two values in conditional statement is know as c) What is entry control and exit control loop? d) Give an example of character constant and string constant. e) Explain the use of assignment arithmetic operator upon simple arithmetic operator with an example. f) Write the name of the following statements. i) A = 5 ii) A = = 5 g) What is the importance of break statement in switch statement? h) Write a alternative statement of the following :- if ( a > b ) x = a*a ; y = b*b ; i) A program is required to print all the even numbers between and 0. What type of statement is required to solve the program along with output statement? 6. a) Write a program to input two meter readings (current month and previous month) and perform the following operations :- Calculate consumed units CU= ( current month previous month readings) Calculate charges based on the following conditions :- Charges =.50 * CU if CU <=50 Charges =.70 * CU if CU >50 and <= 50 Charges =.80 * CU if CU >50 and <= 00 Charges =.90 * CU if CU >00 4

b) Write a program to calculate the sum of the following Series. + x / + x 4 / 5 + x 6 / 7 + x 8 / 9... upto n terms. c) Write a program to input n integers. Find the average of even numbers and average of odd numbers of the given numbers. d) Write a program to input a integer number and check whether the number is palindrome number or not. e) Write a program to check the number is prime or not. f) Write a program to print multiplication table for a given number by printing the table for 0 times. g) Write a program to calculate factorial of a given a number. h) Write a program to find the roots of a quadratic equation. 4 5