COMPUTER SCIENCE 1999 (Delhi Board)



Similar documents
13 Classes & Objects with Constructors/Destructors

COMPUTER SCIENCE. Paper 1 (THEORY)

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

Compiler Construction

CpSc212 Goddard Notes Chapter 6. Yet More on Classes. We discuss the problems of comparing, copying, passing, outputting, and destructing

Lecture 3. Arrays. Name of array. c[0] c[1] c[2] c[3] c[4] c[5] c[6] c[7] c[8] c[9] c[10] c[11] Position number of the element within array c

I PUC - Computer Science. Practical s Syllabus. Contents

A Brief Introduction to MySQL

AP Computer Science Java Subset

Thomas Jefferson High School for Science and Technology Program of Studies Foundations of Computer Science. Unit of Study / Textbook Correlation

Storage Classes CS 110B - Rule Storage Classes Page 18-1 \handouts\storclas

Introduction to Programming (in C++) Loops. Jordi Cortadella, Ricard Gavaldà, Fernando Orejas Dept. of Computer Science, UPC

Example. Introduction to Programming (in C++) Loops. The while statement. Write the numbers 1 N. Assume the following specification:

Binary Adders: Half Adders and Full Adders

10CS35: Data Structures Using C

Chapter 5. Selection 5-1

Comp151. Definitions & Declarations

PES Institute of Technology-BSC QUESTION BANK

Class XII (Theory) C++

Name: Class: Date: 9. The compiler ignores all comments they are there strictly for the convenience of anyone reading the program.

Sample Questions Csci 1112 A. Bellaachia

WESTMORELAND COUNTY PUBLIC SCHOOLS Integrated Instructional Pacing Guide and Checklist Computer Math

9 Control Statements. 9.1 Introduction. 9.2 Objectives. 9.3 Statements

Chapter One Introduction to Programming

SECTION C [short essay] [Not to exceed 120 words, Answer any SIX questions. Each question carries FOUR marks] 6 x 4=24 marks

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

Understanding Logic Design

Boolean Algebra Part 1

Unit Write iterative and recursive C functions to find the greatest common divisor of two integers. [6]

Basic Programming and PC Skills: Basic Programming and PC Skills:

What is a Loop? Pretest Loops in C++ Types of Loop Testing. Count-controlled loops. Loops can be...

VB.NET Programming Fundamentals

Appendix K Introduction to Microsoft Visual C++ 6.0

PIC 10A. Lecture 7: Graphics II and intro to the if statement

MULTIPLE CHOICE. Choose the one alternative that best completes the statement or answers the question.

C++FA 5.1 PRACTICE MID-TERM EXAM

Answers to Review Questions Chapter 7

COMBINATIONAL CIRCUITS

Moving from C++ to VBA

Karnaugh Maps. Circuit-wise, this leads to a minimal two-level implementation

DATA STRUCTURES USING C

Data Structures using OOP C++ Lecture 1

Gates, Circuits, and Boolean Algebra

Oracle Database: SQL and PL/SQL Fundamentals

CHAPTER 3 Boolean Algebra and Digital Logic

Boolean Expressions, Conditions, Loops, and Enumerations. Precedence Rules (from highest to lowest priority)

CSE140: Components and Design Techniques for Digital Systems

Embedded Systems. Review of ANSI C Topics. A Review of ANSI C and Considerations for Embedded C Programming. Basic features of C

UIL Computer Science for Dummies by Jake Warren and works from Mr. Fleming

Arrays. number: Motivation. Prof. Stewart Weiss. Software Design Lecture Notes Arrays

Conditions & Boolean Expressions

Phys4051: C Lecture 2 & 3. Comment Statements. C Data Types. Functions (Review) Comment Statements Variables & Operators Branching Instructions

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

J a v a Quiz (Unit 3, Test 0 Practice)

Logic in Computer Science: Logic Gates

JAVA - QUICK GUIDE. Java SE is freely available from the link Download Java. So you download a version based on your operating system.

BSc (Hons) Business Information Systems, BSc (Hons) Computer Science with Network Security. & BSc. (Hons.) Software Engineering

C++ INTERVIEW QUESTIONS

MS Visual C++ Introduction. Quick Introduction. A1 Visual C++

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

Introduction to SQL for Data Scientists

Chapter 6: Programming Languages

While Loop. 6. Iteration

Passing 1D arrays to functions.

IT2305 Database Systems I (Compulsory)

CSI33 Data Structures

Oracle Database: SQL and PL/SQL Fundamentals NEW

Computer Programming C++ Classes and Objects 15 th Lecture

Chapter 5 Functions. Introducing Functions

JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4

2874CD1EssentialSQL.qxd 6/25/01 3:06 PM Page 1 Essential SQL Copyright 2001 SYBEX, Inc., Alameda, CA

Embedded SQL. Unit 5.1. Dr Gordon Russell, Napier University

How To Create A Table In Sql (Ahem)

Handout 1. Introduction to Java programming language. Java primitive types and operations. Reading keyboard Input using class Scanner.

Design and Development of Virtual Instrument (VI) Modules for an Introductory Digital Logic Course

The C Programming Language course syllabus associate level

Chapter 8 Selection 8-1

IT2304: Database Systems 1 (DBS 1)

Common Beginner C++ Programming Mistakes

Informatica e Sistemi in Tempo Reale

C++ Programming: From Problem Analysis to Program Design, Fifth Edition. Chapter 3: Input/Output

Keywords are identifiers having predefined meanings in C programming language. The list of keywords used in standard C are : unsigned void

C++ Outline. cout << "Enter two integers: "; int x, y; cin >> x >> y; cout << "The sum is: " << x + y << \n ;

Database Programming with PL/SQL: Learning Objectives

CS 141: Introduction to (Java) Programming: Exam 1 Jenny Orr Willamette University Fall 2013

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

3.GETTING STARTED WITH ORACLE8i

Using SQL Server Management Studio

Duration Vendor Audience 5 Days Oracle End Users, Developers, Technical Consultants and Support Staff

7.7 Case Study: Calculating Depreciation

Calling the Function. Two Function Declarations Here is a function declared as pass by value. Why use Pass By Reference?

1. What are Data Structures? Introduction to Data Structures. 2. What will we Study? CITS2200 Data Structures and Algorithms

CLASS-XII COMPUTER SCIENCE (Subject Code 083) SAMPLE PAPER Time allowed : 3 hours Maximum Marks: 70

SUBJECT :- COMPUTER SCIENCE (083) CLASS XII. Unit-Wise Marks and Period Distribution

Sequential Program Execution

First Java Programs. V. Paúl Pauca. CSC 111D Fall, Department of Computer Science Wake Forest University. Introduction to Computer Science

Laboratory Assignments of OBJECT ORIENTED METHODOLOGY & PROGRAMMING (USING C++) [IT 553]

Transcription:

COMPUTER SCIENCE 1999 (Delhi Board) Time allowed: 3 hours Max. Marks: 70 Instructions: (i) All the questions are compulsory. (ii) Programming Language: C++ QUESTION l. (a) Why main function is special? Give two reasons. (b) Name the header files of C++ to which the following functions belong: (i) strcat () (ii) scanf () (iii) getchar() (iv) clrscr () (c) Find the syntax error (s), if any, in the following program: # include <iostream.h> main() int x[5], *y,z[5]: for (i = 0; i < 5; i++) x[il=i; z[i] = i+3; y = z; x = y; Give the output of the following program: # include <stdio.h> void main() char *p = "Difficult"; char c; c = *p++; printf("%c",c); (e) Write the output of the following program : # include <iostream.h> static int i=100; void abc() static int i=8; cout<< "first=" <<i; main()

static int i = 2; abc(); cout << "second = << i << endl; (f) Write a C++ function that converts a 2-digit octal number into binary number and prints the binary equivalent. QUESTION 2. (a) What do you understand by visibility modes in class derivations? What are these modes? (b) Define a class Teacher with the following specifications : Private members : name 20 characters subject 10 characters basic, DA, HRA float salary calculate Public members : Readdata() Displaydata() float A function that computes the salary and returns it. Salary is sum of basic, DA and HRA. A function that accepts data values and invokes the Calculate function. A function that prints the data on the screen. (c) Consider the following declarations and answer the question given below : class vehicle private: int wheels; protected : int passenger: void inputdata (int, int); void outputdata(); ; class heavyvehicle : protected vehicle int diesel_petrol; protected : int load; public: void readdata(int, int); void writedata(); ; class bus : private heavyvehicle

char make[20]; void fetchdata(char); void displaydata(); ; (i) Name the base class and derived class of the class heavy_vehicle. (ii) Name the data member(s) that can be accessed from function displaydatao. (iii) Name the data member's that can be accessed by an object of bus class. (iv) Is the member fraction outputdata() accessible to the objects of heavy_vehicle class. QUESTION 3. (a) Suppose a one-dimensional array AR containing integers is arranged in ascending order. Write a user-defined function in C++ to search for an integer from AR with the help of Binary search method, returning an integer 0 to show absence of the number and integer 1 to show presence of the number in the array. Function should have three parameters : (i) array AR (ii) the number to be searched and (iii) the number of elements N in the array. (b) An array A[10][20] is stored in the memory with each element requiring 2 bytes of storage. If the base address of the array in the memory is 400, determine the location of A[8][13] when the array is stored as (i) row major (ii) column major. (c) Write a user-defined function in C++ to display the multiplication of row element of twodimensional array A[4][6] containing integer. (d) Evaluate the following postfix expression using a stack and show the contents of the stack after execution of each operation. 5,11, 6, 8, +, 12, *, / (e) Give the necessary declaration of a linked list implemented queue containing float type values. Also write a user-defined function in C++ to delete a float type number from the queue. QUESTION 4. (a) Differentiate between read() & write() functions. (b) Assuming the class FLOPPYBOX. write functions in C++ to perform the following: 4 (i) Write the object of FLOPPYBOX to a binary file. (ii) Read objects of FLOPPYBOX from the binary and display on the screen class FLOPPYBOX int size; char name[10]; void getdata() cin >> size; gets (name); void showdata () cout << size << " " << name <<endl;

; QUESTION 5. (a) What is normalization? Define second normal form. Note: Write SQL commands for (b) to (g) and write the output for (h) on the basis of teacher relation given below: RELATION : TEACHER No Name Age Department Dateofjoin Salary Sex 1 Jugal 24 Computer 10/01/97 12000 M 2 Sharmila 21 History 24/03/98 20000 F 3 Sandeep 22 Maths 12/12/96 30000 M 4 Sangeeta 25 History 01/07/99 40000 F 5 Rakesh 22 Maths 05/09/97 25000 M 6 Shyam 30 History 27/06/98 30000 M 7 Shiv Om 34 Computer 25/02/97 21000 M 8 Shalakha 23 Maths 31/07/97 20000 F (b) To show all information about the teacher of History department. (c) To list the name of female teachers who are in Hindi department. (d) To list the names of all the teachers with their date of joining in ascending order. (e) To display Teachers Name, Salary, Age for male teachers only. (f) To count the number of teachers with age > 23. (g) To insert a new row in the Teacher table with the following data. 9, Raja, 26, Computer, 13/05/95, 2300, "M" (h) Give the output of the following SQL statements : (i) SELECT COUNT (DISTINCT department) FROM teacher; (ii) SELECT MAX(age) FROM teacher WHERE sex = "F"; (iii) SELECT AVG(salary) FROM teacher WHERE sex = "M"; (iv) SELECT SUM(salary) FROM teacher WHERE dateofjoin<12,07/96; QUESTION 6. (a) State the distribute law. Verify the law using truth table. (b) Prove x + x'y = x + y algebraically. (c) Write the dual of the Boolean expression (x+y).(x'+y'). (d) Minimize F(w,x,y,z) Karnaugh map. F(w, x, y, z) = (0, 4, 8, 12) (e) Draw a logic circuit of Half Adder. (f) Represent the Boolean expression (x+y)(y+z)(z+x) with the help of NOR gates only. (g) Write the sum of product form of the function F(x,y,z). The truth table representation of F is given as follows : x y Z F 0 0 0 0 0 0 1 1 0 1 0 0

0 1 1 0 1 0 0 1 1 0 1 o / 1 1 0 1 1 1 1 1 QUESTION 7. (a) What is a bridge? (b) What is the purpose of using FTP? (c) Give two advantages and two disadvantages of the following network topologies-bus and Tree. (d) What is the difference between WAN and MAN? Free Download CBSE QUESTION PAPERS, C++ PROJECT, C++ PRACTICAL QUESTION & ANSWERS http://www.cppforschool.com