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

Size: px
Start display at page:

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

Transcription

1 SAMPLE PAPER 1. a) Name the header file for the following built-in functions: a) log() b) exp() c) getch() d) isalnum() e) fabs() f) isalpha() g) toupper() h) cos() i) random() j) gets() k) abs() l) tolower() m) sin() n) endl o) getch() p) cout 2. a) What is a token? Identify one keyword, two identifiers and one string from the program: [3] int a, b; cout<<"input two integer values? "; cin>>a>>b; double avg=(a+b)/2.0; cout<<"average="<<avg<<endl; b)answer the questions based on the program given below: [4] double a, b; cout<<"input two values? "; cin>>a>>b; double am=(a + b)/2, hm=2*a*b/(a + b); cout<<"am="<<am<<endl; cout<<"hm="<<hm<<endl; i) Name two keywords. ii) Name two strings. iii) Name two identifiers. iv) Name two operators 3. Give the output for the following program: [2] int x = 3, y = 4, z = 2; x += x + y + z; y += x + 2 * y + z; z += x + y + 3 * z; x *= y; y *= z; z += x; b) void myfn(int& x, int y, int& z) x *= y += z; z += x += y; 11 1st Term Computer Sc Revision Assignment Page 1/4

2 int a = 7, b = 9; myfn(a, b, a); myfn(b, a, a); c) Give the output of the following program: int z=3; void moo(int& x, int y) x+=x+y+z; y+=x+y+z; z+=x+y+z; if (x!=743) cout<<x<<','<<y<<','<<z<<endl; int z=4; moo(z, ::z); moo(::z, z); moo(z, ::z); d) The following code is from a game, which generate a set of 4 random numbers. Praful is playing this game, help him to identify the correct option(s) out of the four choices given below as the possible set of such numbers generated from the program code so that he wins the game. Justify your answer. #include<stdlib.h> const int LOW=25; randomize(); int POINT=5, Number; for(int I=1;I<=4;I++) Number=LOW+random(POINT); cout<<number<<":" <<endl; POINT- - ; (i) 29:26:25:28: (ii)24:28:25:26: (iii) 29:26:24:28; (iv)29:26:25:26: e) Find the output of the following program; [Delhi 2008] char Text[ ] = Mind@work! ; for(int I=0; Text[I]!= \0 ;I++) if(!isalpha(text[i])) Text[I]= * ; if(isupper(text[i])) Text[I]=Text[I]+1; Text[I] = Text[I+1]; cout<<text; 11 1st Term Computer Sc Revision Assignment Page 2/4

3 f)find the output of the following program: char Mystring[ ] = "what@output!"; for(int I=0; Mystring[I]!= \0 ;I++) if(!isalpha(mystring[i])) Mystring[I]= * ; if(isupper(mystring[i])) Mystring[I]=Mystring[I]+1; Mystring[I] =Mystring[I+1]; cout<<mystring; g) Find the output of the following program; [Delhi 2008] char Text[ ] = Mind@work! ; for(int I=0; Text[I]!= \0 ;I++) if(!isalpha(text[i])) Text[I]= * ; if(isupper(text[i])) Text[I]=Text[I]+1; Text[I] = Text[I+1]; cout<<text; h)find the output of the following program: #include <iostream.h> struct PLAY int Score, Bonus;; void Calculate(PLAY &P, int N=10) P.Score++;P.Bonus+=N; PLAY PL=15,30; Calculate(PL,5); Calculate(PL); Calculate(PL,20); 11 1st Term Computer Sc Revision Assignment Page 3/4

4 4. Name any two C++ operators that work as binary as well as unary operator. [1] 5. Name any two C++ data types that do not support % operator. [1] 6. Why main function is important [1] 7. What is the difference between = and ==? [1] 8. Difference between cin>> and gets in respect to string [2] 9. Explain the utility of getch( ) [1] 10. Name the C++ data types that support two or more type modifier. Name the data types that do not support any type modifier. [2] 11. What do you mean by cascading of I/O operators? [2] 12. Write two differences between keyword and built-in identifier. [2] 13. Differentiate between Syntax Error & Logical Error [2] 14. Construct a logical expression to represent the following conditions [2] i) Weight is greater than or equal to 115 and less than 125. ii) Ch is alphabet (either lowercase letter or uppercase letter) 15 a) i) Write all the possible C++ statements to decrement value of a variable x by 1. ii) Write a logical expression to check that a character variable alpha contains lowercase alphabet (without using islower() function). 16. b) i) Name all the fundamental data type of C++ for which memory is allocated. ii) Name the data types that support two or more type modifiers. iii) Name the data type that does not support any type modifiers. c) What is type casting? With suitable example show two ways of type casting. d) Name the escape sequences given below: i) '\b' ii) '\n' a) In a switch-case statement, which are the optional components? b) i) What is the difference between entry controlled loop and exit controlled loop? c) i) What is conditional operator? What is the other name for conditional operator? ii) int osum=0, esum=0, num; for (int k=1; k<=20; k++) cin>>num; if (num%2==1) osum+=num; esum+=num; cout<<osum<<esum; Replace if- statement by conditional operator. 17. a) i) Mention two differences between local variable and global variable. ii) When is scope resolution operator necessary with global variable? b) i) Write two differences between actual parameter and formal parameter. ii) State any two differences between value parameter and reference parameter. c) i) Differentiate between function prototype and function definition. ii) With an example, differentiate between calling function and called function. 18. a) In a C++ function, what are the optional parts? b) Why do we need return statement in a C++ function? c) What is the advantage of having a C++ function with default parameter? What restriction is to be followed in C++ function with default parameter? 19. Define string. What happens when you display an array name on the screen? 20 Define array? Explain what open Array is? 21. What is array index give its characteristics of it 11 1st Term Computer Sc Revision Assignment Page 4/4

5 22 Define Structure. How value is assigned to data members of structure using initializer. Explain with suitable example 23. What is nested structure explain with suitable example 24. How structure is passed as parameter in a function explain with suitable example 25 Difference between array & structure 25 Write C++ function Based Question on the following: a) Palindromic number (Number is passed as parameter and return type is void) b) Palindromic String (String is passed as parameter and return type is void) c) Toggle String (String is passed as parameter and return type is void) d) Armstrong no (Number is passed as parameter and return type is void) e) Armstrong number between 1 to n(1 ST & N TH Number is passed as parameter and return is void) f) Prime Number (Number is passed as parameter and return type is void) g) Prime Number between 1 to n (1 ST & N TH Number is passed as parameter and return is void) h) Fibonacci integers i) Fibonacci Prime Number between 1 and n(1 ST & N TH Number is passed as parameter and return is void) j) Reverse array elements ( Int/Double array is passed as parameter) k) Sum & product of Even elements of array ( Int/Double array is passed as parameter) l) Sum and product of element divisible by 3 in array ( Int/Double array is passed as parameter) m) Bubble sort the element of array ( Int/Double array is passed as parameter) n) Inserestion sort the element of array ( Int/Double array is passed as parameter) o) Selection sort of Element of an aray ( Int/Double array is passed as parameter) p) Linear Search an element in array ( Int/Double array is passed as parameter and return type is int ) q) Binary Search an element in a array ( Int/Double array is passed as parameter and return type is int) r) Merge sort two array in ascending order to third array in descending order s) Insert an element in array (Int/Double array, Item, position and no of element in array is passed ) t) Delete an element in array (Int/Double array, Item, position and no of element in array is passed ) u) Declare structure struct employee int eno; char name[20]; double basic; //Basic Salary double da; //Dearness Allowance=50% of Basic double hra; //House Rent=30% of Basic double ca; //City Allowance=20% of Basic double gross; //Gross Salary=basic+da+hra+gross ; Define function for void Input() input the values to data member void Display() shows values stored in data member void Salcalc() calculate gross salary for each All Lab Assignment questions expect series question are important All Sample Papers & Sunday test papers given before are important 11 1st Term Computer Sc Revision Assignment Page 5/4

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

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; } SAMPLEPAPER-2016 (Class 11) 1a)Name the header file(s) that shall be needed for successful compilation of the following C++ code. void main( ) char Name[20]; gets(name); int n=1+random(5); for(int k=0;k

More information

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

b) Give the output of the following program: 6,70,70 2,70 210,282,59290 Set II 1. a) Name the header file for the following built-in functions: i) fabs() math.h ii) isalpha() ctype.h iii) toupper() ctype.h iv) cos() math.h b) Give the output of the following program: 6,70,70

More information

Assignment-I. Date of Submission: (Computer Science)

Assignment-I. Date of Submission: (Computer Science) Assignment-I Date of Submission: 23-04-3013 (Computer Science) FIND THE OUTPUT OF FOLLOWING LINE OF CODE FROM QUESTION 1 TO 13 GENERAL /CALL BY VALUE AND CALL BY REFERENCE/SCOPE RESOLUTION Q 1 int f =

More information

ASSIGNMENT CLASS-11 COMPUTER SCIENCE [C++]

ASSIGNMENT CLASS-11 COMPUTER SCIENCE [C++] ASSIGNMENT-1 2016-17 CLASS-11 COMPUTER SCIENCE [C++] 1 Consider the following C++ snippet: int x = 25000; int y = 2*x; cout

More information

Subject: Computer Science

Subject: Computer Science Subject: Computer Science Topic: Data Types, Variables & Operators 1 Write a program to print HELLO WORLD on screen. 2 Write a program to display output using a single cout statement. 3 Write a program

More information

Split up Syllabus (Session )

Split up Syllabus (Session ) Split up Syllabus (Session- -17) COMPUTER SCIENCE (083) CLASS XI Unit No. Unit Name Marks 1 COMPUTER FUNDAMENTALS 10 2 PROGRAMMING METHODOLOGY 12 3 INTRODUCTION TO C++ 14 4 PROGRAMMING IN C++ 34 Total

More information

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

AIR FORCE SCHOOL,BAMRAULI COMPUTER SCIENCE (083) CLASS XI Split up Syllabus (Session ) Contents AIR FORCE SCHOOL,BAMRAULI COMPUTER SCIENCE (083) CLASS XI Split up Syllabus (Session- 2017-18) Month July Contents UNIT 1: COMPUTER FUNDAMENTALS Evolution of computers; Basics of computer and its operation;

More information

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

I SEMESTER EXAM : : XI :COMPUTER SCIENCE : MAX MARK a) What is the difference between Hardware and Software? Give one example for each. 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.

More information

VARIABLE, OPERATOR AND EXPRESSION [SET 1]

VARIABLE, OPERATOR AND EXPRESSION [SET 1] VARIABLE, OPERATOR AND EXPRESSION Question 1 Write a program to print HELLO WORLD on screen. Write a program to display the following output using a single cout statement. Subject Marks Mathematics 90

More information

Introduction to Computer Science Midterm 3 Fall, Points

Introduction to Computer Science Midterm 3 Fall, Points Introduction to Computer Science Fall, 2001 100 Points Notes 1. Tear off this sheet and use it to keep your answers covered at all times. 2. Turn the exam over and write your name next to the staple. Do

More information

Sample Paper - II Subject Computer Science

Sample Paper - II Subject Computer Science Sample Paper - II Subject Computer Science Max Marks 70 Duration 3 hrs Note:- All questions are compulsory Q1) a) What is significance of My Computer? 2 b) Explain different types of operating systems.

More information

COMPUTER SCIENCE (083)

COMPUTER SCIENCE (083) 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

More information

Computer Science XII Important Concepts for CBSE Examination Questions

Computer Science XII Important Concepts for CBSE Examination Questions Computer Science XII Important Concepts for CBSE Examination Questions LEARN FOLLOWIING GIVEN CONCEPS 1. Encapsulation: Wraps up data and functions under single unit through class. Create a class as example.

More information

Downloaded from

Downloaded from Unit I Chapter -1 PROGRAMMING IN C++ Review: C++ covered in C++ Q1. What are the limitations of Procedural Programming? Ans. Limitation of Procedural Programming Paradigm 1. Emphasis on algorithm rather

More information

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

KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE CLASS XI KENDRIYA VIDYALAYA SANGATHAN BHUBANESWAR REGION SPLITUP SYLLABUS FOR COMPUTER SCIENCE 2015-2016 CLASS XI Month Portion to be covered Th Prac July 2015 Computer Fundamentals 25 8 Classification of computers:

More information

vinodsrivastava.wordpress.com Question Bank Term-1

vinodsrivastava.wordpress.com Question Bank Term-1 vinodsrivastava.wordpress.com Question Bank Term-1 Q1 Write Header File for following Function/object Function/object presents in header file cin, cout, endl, gets(), puts(), M_PI, abs(), labs(), fabs(),

More information

Questions Bank. 14) State any four advantages of using flow-chart

Questions Bank. 14) State any four advantages of using flow-chart Questions Bank Sub:PIC(22228) Course Code:-EJ-2I ----------------------------------------------------------------------------------------------- Chapter:-1 (Overview of C Programming)(10 Marks) 1) State

More information

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

BRAIN INTERNATIONAL SCHOOL Term-II Class-XI Sub:- Computer Science Revision Sheet BRAIN INTERNATIONAL SCHOOL Term-II Class-XI 2018-19 Computer Organisation Sub:- Computer Science Revision Sheet 1. Which electronic device invention brought revolution in earlier computers? 2. Which memory

More information

UNIT- 3 Introduction to C++

UNIT- 3 Introduction to C++ UNIT- 3 Introduction to C++ C++ Character Sets: Letters A-Z, a-z Digits 0-9 Special Symbols Space + - * / ^ \ ( ) [ ] =!= . $, ; : %! &? _ # = @ White Spaces Blank spaces, horizontal tab, carriage

More information

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

PART I.   Part II Answer to all the questions 1. What is meant by a token? Name the token available in C++. Unit - III CHAPTER - 9 INTRODUCTION TO C++ Choose the correct answer. PART I 1. Who developed C++? (a) Charles Babbage (b) Bjarne Stroustrup (c) Bill Gates (d) Sundar Pichai 2. What was the original name

More information

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

BRAIN INTERNATIONAL SCHOOL. Term-I Class XI Sub: Computer Science Revision Worksheet BRAIN INTERNATIONAL SCHOOL Term-I Class XI 2018-19 Sub: Computer Science Revision Worksheet Chapter-1. Computer Overview 1. Which electronic device invention brought revolution in earlier computers? 2.

More information

I Internal Examination Sept Class: - BCA I Subject: - Principles of Programming Lang. (BCA 104) MM: 40 Set: A Time: 1 ½ Hrs.

I Internal Examination Sept Class: - BCA I Subject: - Principles of Programming Lang. (BCA 104) MM: 40 Set: A Time: 1 ½ Hrs. I Internal Examination Sept. 2018 Class: - BCA I Subject: - Principles of Programming Lang. (BCA 104) MM: 40 Set: A Time: 1 ½ Hrs. [I]Very short answer questions (Max 40 words). (5 * 2 = 10) 1. What is

More information

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

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 1 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 variables. Apply C++ syntax rules to declare variables, initialize

More information

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

SPLIT UP SYLLABUS SUBJECT : COMPUTER SCIENCE (083) SESSION: Class XI (Theory) C++ Duration: 3 hours Total Marks: 70 SPLIT UP SYLLABUS SUBJECT : COMPUTER SCIENCE (083) SESSION:2014-15 Class XI (Theory) C++ Duration: 3 hours Total Marks: 70 Unit No. Unit Name MARKS 1. COMPUTER FUNDAMENTALS 10 2. INTRODUCTION TO C++ 14

More information

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9

Aryan College. Fundamental of C Programming. Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Fundamental of C Programming Unit I: Q1. What will be the value of the following expression? (2017) A + 9 Q2. Write down the C statement to calculate percentage where three subjects English, hindi, maths

More information

Downloaded from

Downloaded from CLASS 11 COMPUTER SCIENCE (83) PRACTICAL LIST 1. Write a C++ Program to find area & circumference of circle. 2. Write a C++ Program to display ASCII character & vice versa. 3. Write a C++ Program to find

More information

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

SBOA SCHOOL & JUNIOR COLLEGE, CHENNAI 101 COMPUTER SCIENCE CLASS: XI HALF YEARLY EXAMINATION MAX MARKS:70 CODE - A DURATION : 3 Hours SBOA SCHOOL & JUNIOR COLLEGE, CHENNAI 101 COMPUTER SCIENCE CLASS: XI HALF YEARLY EXAMINATION 2016 MAX MARKS:70 CODE - A DURATION : 3 Hours All questions are compulsory. Do not change the order of the questions

More information

OBJECT ORIENTED PROGRAMMING. Ms. Ajeta Nandal C.R.Polytechnic,Rohtak

OBJECT ORIENTED PROGRAMMING. Ms. Ajeta Nandal C.R.Polytechnic,Rohtak OBJECT ORIENTED PROGRAMMING Ms. Ajeta Nandal C.R.Polytechnic,Rohtak OBJECT ORIENTED PARADIGM Object 2 Object 1 Data Data Function Function Object 3 Data Function 2 WHAT IS A MODEL? A model is an abstraction

More information

Consider the following statements. string str1 = "ABCDEFGHIJKLM"; string str2; After the statement str2 = str1.substr(1,4); executes, the value of str2 is " ". Given the function prototype: float test(int,

More information

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

ADARSH VIDYA KENDRA NAGERCOIL COMPUTER SCIENCE. Grade: IX C++ PROGRAMMING. Department of Computer Science 1 NAGERCOIL COMPUTER SCIENCE Grade: IX C++ PROGRAMMING 1 C++ 1. Object Oriented Programming OOP is Object Oriented Programming. It was developed to overcome the flaws of the procedural approach to programming.

More information

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.

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. 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. B. Outputs to the console a floating point number f1 in scientific format

More information

PROGRAMMING IN C AND C++:

PROGRAMMING IN C AND C++: PROGRAMMING IN C AND C++: Week 1 1. Introductions 2. Using Dos commands, make a directory: C:\users\YearOfJoining\Sectionx\USERNAME\CS101 3. Getting started with Visual C++. 4. Write a program to print

More information

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

Multiple Choice (Questions 1 14) 28 Points Select all correct answers (multiple correct answers are possible) Name Closed notes, book and neighbor. If you have any questions ask them. Notes: Segment of code necessary C++ statements to perform the action described not a complete program Program a complete C++ program

More information

CS 31 Review Sheet. Tau Beta Pi - Boelter Basics 2. 2 Working with Decimals 2. 4 Operators 3. 6 Constants 3.

CS 31 Review Sheet. Tau Beta Pi - Boelter Basics 2. 2 Working with Decimals 2. 4 Operators 3. 6 Constants 3. CS 31 Review Sheet Tau Beta Pi - Boelter 6266 Contents 1 Basics 2 2 Working with Decimals 2 3 Handling Strings and Numbers with stdin/stdout 3 4 Operators 3 5 Common Mistakes/Misconceptions 3 6 Constants

More information

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

AHLCON PUBLIC SCHOOL, MAYUR VIHAR I, DELHI ASSIGNMENT CLASS XI Session Chapter 1: Computer Overview AHLCON PUBLIC SCHOOL, MAYUR VIHAR I, DELHI - 110091 ASSIGNMENT CLASS XI Session 2018-19 Chapter 1: Computer Overview 1. 2. 3. What is the difference between data and information. What is CPU. Explain the

More information

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

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible) Name Closed notes, book and neighbor. If you have any questions ask them. Notes: Segment of code necessary C++ statements to perform the action described not a complete program Program a complete C++ program

More information

Lecture 3 Tao Wang 1

Lecture 3 Tao Wang 1 Lecture 3 Tao Wang 1 Objectives In this chapter, you will learn about: Arithmetic operations Variables and declaration statements Program input using the cin object Common programming errors C++ for Engineers

More information

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

Multiple Choice (Questions 1 14) 28 Points Select all correct answers (multiple correct answers are possible) Name Closed notes, book and neighbor. If you have any questions ask them. Notes: Segment of code necessary C++ statements to perform the action described not a complete program Program a complete C++ program

More information

case control statement (switch case)

case control statement (switch case) KEY POINTS: Introduction to C++ C++ is the successor of C language & developed by Bjarne Stroustrup at Bell Laboratories, New Jersey in 1979. Tokens- smallest individual unit. Following are the tokens

More information

CSCE 110 PROGRAMMING FUNDAMENTALS

CSCE 110 PROGRAMMING FUNDAMENTALS CSCE 110 PROGRAMMING FUNDAMENTALS WITH C++ Prof. Amr Goneid AUC Part 2. Overview of C++ Prof. Amr Goneid, AUC 1 Overview of C++ Prof. Amr Goneid, AUC 2 Overview of C++ Historical C++ Basics Some Library

More information

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

3/12/2018. Structures. Programming in C++ Sequential Branching Repeating. Loops (Repetition) Structures Programming in C++ Sequential Branching Repeating Loops (Repetition) 2 1 Loops Repetition is referred to the ability of repeating a statement or a set of statements as many times this is necessary.

More information

CHAPTER 4 FUNCTIONS. 4.1 Introduction

CHAPTER 4 FUNCTIONS. 4.1 Introduction CHAPTER 4 FUNCTIONS 4.1 Introduction Functions are the building blocks of C++ programs. Functions are also the executable segments in a program. The starting point for the execution of a program is main

More information

Downloaded from

Downloaded from Function: A function is a named unit of a group of statements that can be invoked from other parts of the program. The advantages of using functions are: Functions enable us to break a program down into

More information

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

CAMBRIDGE SCHOOL, NOIDA ASSIGNMENT 1, TOPIC: C++ PROGRAMMING CLASS VIII, COMPUTER SCIENCE CAMBRIDGE SCHOOL, NOIDA ASSIGNMENT 1, TOPIC: C++ PROGRAMMING CLASS VIII, COMPUTER SCIENCE a) Mention any 4 characteristic of the object car. Ans name, colour, model number, engine state, power b) What

More information

(i) Describe in detail about the classification of computers with their features and limitations(10)

(i) Describe in detail about the classification of computers with their features and limitations(10) UNIT I - INTRODUCTION Generation and Classification of Computers- Basic Organization of a Computer Number System Binary Decimal Conversion Problems. Need for logical analysis and thinking Algorithm Pseudo

More information

VALLIAMMAI ENGINEERING COLLEGE

VALLIAMMAI ENGINEERING COLLEGE VALLIAMMAI ENGINEERING COLLEGE SRM Nagar, Kattankulathur 603 203 DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING QUESTION BANK B.E. - Electrical and Electronics Engineering IV SEMESTER CS6456 - OBJECT ORIENTED

More information

Absolute C++ Walter Savitch

Absolute C++ Walter Savitch Absolute C++ sixth edition Walter Savitch Global edition This page intentionally left blank Absolute C++, Global Edition Cover Title Page Copyright Page Preface Acknowledgments Brief Contents Contents

More information

Characters, c-strings, and the string Class. CS 1: Problem Solving & Program Design Using C++

Characters, c-strings, and the string Class. CS 1: Problem Solving & Program Design Using C++ Characters, c-strings, and the string Class CS 1: Problem Solving & Program Design Using C++ Objectives Perform character checks and conversions Knock down the C-string fundamentals Point at pointers and

More information

Converting a Lowercase Letter Character to Uppercase (Or Vice Versa)

Converting a Lowercase Letter Character to Uppercase (Or Vice Versa) Looping Forward Through the Characters of a C String A lot of C string algorithms require looping forward through all of the characters of the string. We can use a for loop to do that. The first character

More information

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

void Add() { cin >> trainnumber; gets(trainname); } void display() { cout<<trainnumber <<:<<TrainName<<end; . T SHREE MAHAPRABHU PUBLIC SCHOOL & COLLEGE QUESTION BANK FOR BOARD EXAMINATION 016-17 SUBJECT COMPUTER SCIENCE (Code: 083) Q1. Answer the following questions: a) Name the header file(s) that shall be

More information

BITG 1233: Introduction to C++

BITG 1233: Introduction to C++ BITG 1233: Introduction to C++ 1 Learning Outcomes At the end of this lecture, you should be able to: Identify basic structure of C++ program (pg 3) Describe the concepts of : Character set. (pg 11) Token

More information

KENDRIYA VIDYALAYA PICKET : SECUNDERABAD :09 CLASS XII HOLIDAY HOME WORK

KENDRIYA VIDYALAYA PICKET : SECUNDERABAD :09 CLASS XII HOLIDAY HOME WORK KENDRIYA VIDYALAYA PICKET : SECUNDERABAD :09 CLASS XII HOLIDAY HOME WORK SUBJECT : MATHS SUBJECT :ACCOUNTANCY 1. Complete comprehensive project ( As discussed in the classroom). 2. Download 10 CBSE sample

More information

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

KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK XII COMPUTER SCIENCE ARRAY AND STRUCTURES KENDRIYA VIDYALAYA ALIGANJ SHIFT-II HOLIDAY HOME WORK- 2018-19 XII COMPUTER SCIENCE ARRAY AND STRUCTURES 1. Write a function which will take a string and returns the word count. Each word is separated

More information

INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI

INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI 2017-2018 Worksheet No. 1 Topic : Getting Started With C++ 1. Write a program to generate the following output: Year Profit% 2011 18 2012 27 2013 32

More information

6.096 Introduction to C++ January (IAP) 2009

6.096 Introduction to C++ January (IAP) 2009 MIT OpenCourseWare http://ocw.mit.edu 6.096 Introduction to C++ January (IAP) 2009 For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms. Welcome to 6.096 Lecture

More information

Differentiate Between Keywords and Identifiers

Differentiate Between Keywords and Identifiers History of C? Why we use C programming language Martin Richards developed a high-level computer language called BCPL in the year 1967. The intention was to develop a language for writing an operating system(os)

More information

LECTURE 02 INTRODUCTION TO C++

LECTURE 02 INTRODUCTION TO C++ PowerPoint Slides adapted from *Starting Out with C++: From Control Structures through Objects, 7/E* by *Tony Gaddis* Copyright 2012 Pearson Education Inc. COMPUTER PROGRAMMING LECTURE 02 INTRODUCTION

More information

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

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 Sample Test Paper-I Marks : 25 Time:1 Hrs. Q1. Attempt any THREE 09 Marks a) State four relational operators with meaning. b) State the use of break statement. c) What is constant? Give any two examples.

More information

CS242 COMPUTER PROGRAMMING

CS242 COMPUTER PROGRAMMING CS242 COMPUTER PROGRAMMING I.Safa a Alawneh Variables Outline 2 Data Type C++ Built-in Data Types o o o o bool Data Type char Data Type int Data Type Floating-Point Data Types Variable Declaration Initializing

More information

calling a function - function-name(argument list); y = square ( z ); include parentheses even if parameter list is empty!

calling a function - function-name(argument list); y = square ( z ); include parentheses even if parameter list is empty! Chapter 6 - Functions return type void or a valid data type ( int, double, char, etc) name parameter list void or a list of parameters separated by commas body return keyword required if function returns

More information

Superior University. Department of Electrical Engineering CS-115. Computing Fundamentals. Experiment No.7. User Defined Functions II

Superior University. Department of Electrical Engineering CS-115. Computing Fundamentals. Experiment No.7. User Defined Functions II Superior University Department of Electrical Engineering CS-115 Computing Fundamentals Experiment No.7 User Defined Functions II Prepared for By: Name: ID: Section: Semester: Total Marks: Obtained Marks:

More information

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

Multiple Choice (Questions 1 13) 26 Points Select all correct answers (multiple correct answers are possible) Name Closed notes, book and neighbor. If you have any questions ask them. Notes: Segment of code necessary C++ statements to perform the action described not a complete program Program a complete C++ program

More information

Chapter 1. Computer Overview

Chapter 1. Computer Overview DELHI PUBLIC SCHOOL, Durgapur QUESTION BANK of computer science FOR block test-i examination (2018-19) CLASS-XI Chapter 1. Computer Overview 1. What is data? What is information? 2. Name the subunits of

More information

Sample Paper Class XI Subject Computer Sience UNIT TEST II

Sample Paper Class XI Subject Computer Sience UNIT TEST II Sample Paper Class XI Subject Computer Sience UNIT TEST II (General OOP concept, Getting Started With C++, Data Handling and Programming Paradigm) TIME: 1.30 Hrs Max Marks: 40 ALL QUESTIONS ARE COMPULSURY.

More information

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University

B.V. Patel Institute of Business Management, Computer & Information Technology, Uka Tarsadia University Unit 1 Programming Language and Overview of C 1. State whether the following statements are true or false. a. Every line in a C program should end with a semicolon. b. In C language lowercase letters are

More information

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p.

Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. Introduction to Computers and C++ Programming p. 1 Computer Systems p. 2 Hardware p. 2 Software p. 7 High-Level Languages p. 8 Compilers p. 9 Self-Test Exercises p. 11 History Note p. 12 Programming and

More information

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

3. Functions. Modular programming is the dividing of the entire problem into small sub problems that can be solved by writing separate programs. 1 3. Functions 1. What are the merits and demerits of modular programming? Modular programming is the dividing of the entire problem into small sub problems that can be solved by writing separate programs.

More information

CISC 1110 (CIS 1.5) Introduc2on to Programming Using C++

CISC 1110 (CIS 1.5) Introduc2on to Programming Using C++ CISC 1110 (CIS 1.5) Introduc2on to Programming Using C++ Spring 2012 Instructor : K. Auyeung Email Address: Course Page: Class Hours: kenny@sci.brooklyn.cuny.edu hbp://www.sci.brooklyn.cuny.edu/~kenny/cisc1110

More information

Suggestive List of C++ Programs

Suggestive List of C++ Programs Suggestive List of C++ Programs 1. Write a C++ program to display Hello World! on the output screen. 2. Write a program to display Multiplication Table of a number inputted by the user. 3. Write a program

More information

Fundamentals of Computer Programming Using C

Fundamentals of Computer Programming Using C CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar Faculty Name: Ami D. Trivedi Class: FYBCA Subject: US01CBCA01 (Fundamentals of Computer Programming Using C) *UNIT 3 (Structured Programming, Library Functions

More information

Multiple Choice Questions ( 1 mark)

Multiple Choice Questions ( 1 mark) Multiple Choice Questions ( 1 mark) Unit-1 1. is a step by step approach to solve any problem.. a) Process b) Programming Language c) Algorithm d) Compiler 2. The process of walking through a program s

More information

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR 603 203 FIRST SEMESTER B.E / B.Tech., (Common to all Branches) QUESTION BANK - GE 6151 COMPUTER PROGRAMMING UNIT I - INTRODUCTION Generation and

More information

Programming. C++ Basics

Programming. C++ Basics Programming C++ Basics Introduction to C++ C is a programming language developed in the 1970s with the UNIX operating system C programs are efficient and portable across different hardware platforms C++

More information

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University

Main Program. C Programming Notes. #include <stdio.h> main() { printf( Hello ); } Comments: /* comment */ //comment. Dr. Karne Towson University C Programming Notes Dr. Karne Towson University Reference for C http://www.cplusplus.com/reference/ Main Program #include main() printf( Hello ); Comments: /* comment */ //comment 1 Data Types

More information

If the function modify( ) is supposed to change the mark of a student having student_no y in the file student.dat, write the missing statements to modify the student record. 10. Observe the program segment

More information

(a) Differentiate between a call by value and call by reference method.

(a) Differentiate between a call by value and call by reference method. ATOMIC ENERGY CENTRAL SCHOOL NO- RAWATBHATA Half Yearly Examination 05 Model Paper Class XII Subject Computer Science Time Allowed: hours Maximum Marks: 70 Note. (i) All questions are compulsory. (ii)

More information

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.

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. Chapter-12 FUNCTIONS Introduction 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. Types of functions There are two types

More information

Technical Questions. Q 1) What are the key features in C programming language?

Technical Questions. Q 1) What are the key features in C programming language? Technical Questions Q 1) What are the key features in C programming language? Portability Platform independent language. Modularity Possibility to break down large programs into small modules. Flexibility

More information

Creating a C++ Program

Creating a C++ Program Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer. 1 Creating a C++ Program created using an

More information

Part II Answer to all the questions (2 Marks):

Part II Answer to all the questions (2 Marks): Unit - III CHAPTER - 11 Functions in C++ Part 1 Choose the best answer 1. Which of the following header file defines the standard I/O predefined functions? A) stdio.h B) math.h C) string.h D) ctype.h 2.

More information

Programming - 1. Computer Science Department 011COMP-3 لغة البرمجة 1 لطالب كلية الحاسب اآللي ونظم المعلومات 011 عال- 3

Programming - 1. Computer Science Department 011COMP-3 لغة البرمجة 1 لطالب كلية الحاسب اآللي ونظم المعلومات 011 عال- 3 Programming - 1 Computer Science Department 011COMP-3 لغة البرمجة 1 011 عال- 3 لطالب كلية الحاسب اآللي ونظم المعلومات 1 1.1 Machine Language A computer programming language which has binary instructions

More information

Chapter 7 - Notes User-Defined Functions II

Chapter 7 - Notes User-Defined Functions II Chapter 7 - Notes User-Defined Functions II I. VOID Functions ( The use of a void function is done as a stand alone statement.) A. Void Functions without Parameters 1. Syntax: void functionname ( void

More information

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

Programming Fundamentals. With C++ Variable Declaration, Evaluation and Assignment 1 300580 Programming Fundamentals 3 With C++ Variable Declaration, Evaluation and Assignment 1 Today s Topics Variable declaration Assignment to variables Typecasting Counting Mathematical functions Keyboard

More information

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

Programming in C++ The manager of a company. Lecture Notes 6. Functions (Procedures) 4/24/2018. he he he. Does Does Does The manager of a company Programming in C++ Lecture Notes 6 Functions (Procedures) Does Does Does he he he pay the bills? answer the phone? clean the office? 2 1 Division of Labor Our programs until now

More information

CLASS-XI COMPUTER SCIENCE

CLASS-XI COMPUTER SCIENCE Roll No. Code : 112014-083-A Please check that this question paper contains 7 questions and 8 printed pages. CLASS-XI COMPUTER SCIENCE Time Allowed : 3 Hrs. Maximum Marks : 70 General Instructions : All

More information

Study Guide for Test 2

Study Guide for Test 2 Study Guide for Test 2 Topics: decisions, loops, arrays, c-strings, linux Material Selected from: Chapters 4, 5, 6, 7, 10.1, 10.2, 10.3, 10.4 Examples 14 33 Assignments 4 8 Any syntax errors are unintentional

More information

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur

PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam Thanjavur PERIYAR CENTENARY POLYTECHNIC COLLEGE Periyar Nagar- Vallam-613 403 Thanjavur 01. Define program? 02. What is program development cycle? 03. What is a programming language? 04. Define algorithm? 05. What

More information

C++ Basic Elements of COMPUTER PROGRAMMING. Special symbols include: Word symbols. Objectives. Programming. Symbols. Symbols.

C++ Basic Elements of COMPUTER PROGRAMMING. Special symbols include: Word symbols. Objectives. Programming. Symbols. Symbols. EEE-117 COMPUTER PROGRAMMING Basic Elements of C++ Objectives General Questions Become familiar with the basic components of a C++ program functions, special symbols, and identifiers Data types Arithmetic

More information

Exercise 1.1 Hello world

Exercise 1.1 Hello world Exercise 1.1 Hello world The goal of this exercise is to verify that computer and compiler setup are functioning correctly. To verify that your setup runs fine, compile and run the hello world example

More information

Syllabus of Diploma Engineering. Computer Engineering. Semester: II. Subject Name: Computer Programming. Subject Code: 09CE1104

Syllabus of Diploma Engineering. Computer Engineering. Semester: II. Subject Name: Computer Programming. Subject Code: 09CE1104 Semester: II Subject Name: Computer Programming Subject Code: 09CE1104 Objective: This Course will help to develop programming skills in the students, using a structured programming language `C'. Students

More information

COMPUTER SCIENCE (083)

COMPUTER SCIENCE (083) Roll No. Code : 112012-083 Please check that this question paper contains 7 questions and 8 printed pages. CLASS-XI COMPUTER SCIENCE (083) Time Allowed : 3 Hrs. Maximum Marks : 70 General Instructions

More information

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING

STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING OBJECT ORIENTED PROGRAMMING STUDY NOTES UNIT 1 - INTRODUCTION TO OBJECT ORIENTED PROGRAMMING 1. Object Oriented Programming Paradigms 2. Comparison of Programming Paradigms 3. Basic Object Oriented Programming

More information

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9

Character Set. The character set of C represents alphabet, digit or any symbol used to represent information. Digits 0, 1, 2, 3, 9 Character Set The character set of C represents alphabet, digit or any symbol used to represent information. Types Uppercase Alphabets Lowercase Alphabets Character Set A, B, C, Y, Z a, b, c, y, z Digits

More information

SAMPLE PAPER. Class: XII SUBJECT COMPUTER SCIENCE. Time: 3 Hours MM: 70

SAMPLE PAPER. Class: XII SUBJECT COMPUTER SCIENCE. Time: 3 Hours MM: 70 SAMPLE PAPER Class - XII SUBJECT COMPUTER SCIENCE Subject: Computer Sc. Class: XII Time: 3 Hours MM: 70 1. (a) Differentiate between a global variable and a local variable. (b) Name the Header file(s)

More information

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

DHA Suffa University CS 103 Object Oriented Programming Fall 2015 Lab #01: Introduction to C++ DHA Suffa University CS 103 Object Oriented Programming Fall 2015 Lab #01: Introduction to C++ Objective: To Learn Basic input, output, and procedural part of C++. C++ Object-orientated programming language

More information

CS201 Spring2009 Solved Sunday, 09 May 2010 14:57 MIDTERM EXAMINATION Spring 2009 CS201- Introduction to Programming Question No: 1 ( Marks: 1 ) - Please choose one The function of cin is To display message

More information

Computer Programming C++ (wg) CCOs

Computer Programming C++ (wg) CCOs Computer Programming C++ (wg) CCOs I. The student will analyze the different systems, and languages of the computer. (SM 1.4, 3.1, 3.4, 3.6) II. The student will write, compile, link and run a simple C++

More information

Contents. Preface. Introduction. Introduction to C Programming

Contents. Preface. Introduction. Introduction to C Programming c11fptoc.fm Page vii Saturday, March 23, 2013 4:15 PM Preface xv 1 Introduction 1 1.1 1.2 1.3 1.4 1.5 Introduction The C Programming Language C Standard Library C++ and Other C-Based Languages Typical

More information

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

16. What is the significance of the break statement in a switch block? Section A : Question carrying 1 Mark 01. How is data different from information? 02. Arrange the following in descending order :- Nibble, KB, Bit, GB,TB,Byte,MB 03. What is the significance of task bar

More information

Grades. Notes (by question) Score Num Students Approx Grade A 90s 7 A 80s 20 B 70s 9 C 60s 9 C

Grades. Notes (by question) Score Num Students Approx Grade A 90s 7 A 80s 20 B 70s 9 C 60s 9 C Grades Score Num Students Approx Grade 100 1 A 90s 7 A 80s 20 B 70s 9 C 60s 9 C Score Num Students Approx Grade 50s 7 C 40s 5 D 30s 3 D 20s 1 F Notes (by question) 1. Use exit to avoid long if-then-else

More information