Subject: Computer Science

Similar documents
VARIABLE, OPERATOR AND EXPRESSION [SET 1]

INDIAN SCHOOL MUSCAT COMPUTER SCIENCE(083) CLASS XI

PROGRAMMING IN C AND C++:

Downloaded from

UNIVERSITY OF ENGINEERING & MANAGEMENT, KOLKATA C ASSIGNMENTS

B. V. Patel Institute of Business Management, Computer & Information Technology, UTU 2013

List of Practical for Class XII Computer Science

[6] [6] [6] [5] [5] [6] [5] [5]

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

Practical List of. MCA IV SEM Session -2010

Suggestive List of C++ Programs

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

Week 0. Net Salary =Earnings- deductions; Read the employee number, Basic Print employee Number, Earnings,Deductions and Net salary.

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

BCA-105 C Language What is C? History of C

Tribhuvan University Institute of Science and Technology 2065

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

PROGRAMS. EXCELLENT ACADEMY OF ENGINEERING. Telephone: / NORMAL PROGRAM

LOOPS. 1- Write a program that prompts user to enter an integer N and determines and prints the sum of cubes from 5 to N (i.e. sum of 5 3 to N 3 ).

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANGULATHUR

DR. A.P.J. ABDUL KALAM TECHNICAL UNIVERSITY LUCKNOW. Evaluation Scheme & Syllabus. For. B.Tech. First Year (Programming for Problem Solving)

ANNA UNIVERSITY: CHENNAI B.E./B.Tech. DEGREE EXAMINATIONS, JAN Regulations First Semester (Common to All Branches )

Lab Manual. Program Design and File Structures (P): IT-219

3 The L oop Control Structure

Chapter 1. Computer Overview

EASY

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

UNIT I : OVERVIEW OF COMPUTERS AND C-PROGRAMMING

General Instructions. You can use QtSpim simulator to work on these assignments.

Lecture 2 Arrays, Searching and Sorting (Arrays, multi-dimensional Arrays)

Algorithms 4. Odd or even Algorithm 5. Greatest among three numbers Algorithm 6. Simple Calculator Algorithm

Question Bank (SPA SEM II)

Hrs Hrs Hrs Hrs Hrs Marks Marks Marks Marks Marks

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

Computer Science & Engineering. Second Year

KENDRIYA VIDYALYA CLRI CHENNAI AUTUMN BREAK HOLIDAY HW MARKS QUESTIONS : DATA STRUCTURE

Sorting is ordering a list of objects. Here are some sorting algorithms

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

Long Questions. 7. How does union help in storing the values? How it differs from structure?

Sardar Patel University S Y BSc. Computer Science CS-201 Introduction to Programming Language Effective from July-2002

Object Oriented Programming 2012

Loops / Repetition Statements

PDS Lab (Assignment 1) Date: 31 st July, 2017 (2-6 pm)

Sample Paper of Computer for Class 10

Chapter 3 Problem Solving and the Computer

VALLIAMMAI ENGINEERING COLLEGE

An array is a collection of data that holds fixed number of values of same type. It is also known as a set. An array is a data type.

CS 6456 OBJCET ORIENTED PROGRAMMING IV SEMESTER/EEE

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

Reg. No. : Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, JANUARY First Semester GE 6151 COMPUTER PROGRAMMING

Department of Computer Science & Engineering Indian Institute of Technology Kharagpur. Practice Sheet #04

Programming in OOP/C++

Matrices. A Matrix (This one has 2 Rows and 3 Columns) To add two matrices: add the numbers in the matching positions:

Chapter 8 Algorithms 1

Objectives of This Chapter

Equations and Functions, Variables and Expressions

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

TOPICS TO COVER:-- Array declaration and use.

OUTLINES. Variable names in MATLAB. Matrices, Vectors and Scalar. Entering a vector Colon operator ( : ) Mathematical operations on vectors.

C- PROGRAMMING (3:0:0) Sub code : CS1C01/CS2C01 CIE : 50%Marks Hrs/week : 03 SEE : 50%Marks SEE Hrs : 03 Hours Max. Marks: 100 Course Outcomes:

LAB 1 Binary Numbers/ Introduction to C. Rajesh Rajamani. ME 4231 Department of Mechanical Engineering University Of Minnesota

Introduction to MATLAB for Engineers, Third Edition

Problem A - EPIC. Line Width of Letters (# characters) EEEEEEEEEE EEEEEEEEEE EE EE EEEEEEEEEE EEEEEEEEEE EE EE EEEEEEEEEE EEEEEEEEEE

6th Grade Arithmetic (with QuickTables)

CORE JAVA TRAINING COURSE CONTENT

Chapter 8 Arrays and Strings. Objectives. Objectives (cont d.) Introduction. Arrays 12/23/2016. In this chapter, you will:

Introduction to MATLAB 7 for Engineers

LIST OF EXPERIMENTS. (1) (Office Automation)

4. Use a loop to print the first 25 Fibonacci numbers. Do you need to store these values in a data structure such as an array or list?

Columns A[0] A[0][0] = 20 A[0][1] = 30

Chapter 6 Pointers and Arrays

Physics 326G Winter Class 2. In this class you will learn how to define and work with arrays or vectors.

1. Wap in JAVA to accept two values and calculate highest value and lowest value.

'C' Programming Language

Unit 3 Fill Series, Functions, Sorting

Unit 3 Functions Review, Fill Series, Sorting, Merge & Center

Computer Science 330 Assignment

A Secondary storage Algorithms and Data Structures Supplementary Questions and Exercises

CLASS 8 (Mathematics) -EM

VALLIAMMAI ENGINEERING COLLEGE

Introduction to Computer Science Midterm 3 Fall, Points

Andrew Shitov. Using Perl Programming Challenges Solved with the Perl 6 Programming Language

Review of Important Topics in CS1600. Functions Arrays C-strings

Lab ACN : C++ Programming Exercises

Practical Exercise 1 Question 1: The Hello World Program Write a Fortran 95 program to write out Hello World on the screen.

DIOCESAN COLLEGE PREPARATORY SCHOOL Mathematics Syllabus: Grade 7

C PROGRAMMING LAB MANUAL

TIME: 3 HOURS MARKS: a. Develop a java program to sort an array of N numbers in ascending order. (40)

M i c r o s o f t E x c e l A d v a n c e d. Microsoft Excel 2010 Advanced

Week - 03 Lecture - 18 Recursion. For the last lecture of this week, we will look at recursive functions. (Refer Slide Time: 00:05)

PROBLEM SOLVING TECHNIQUES SECTION - A. 1. Answer any ten of the following

COMPUTER APPLICATIONS

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

x= suppose we want to calculate these large values 1) x= ) x= ) x=3 100 * ) x= ) 7) x=100!

N.B. These pastpapers may rely on the knowledge gained from the previous chapters.

Babaria Institute of Technology Computer Science and Engineering Department Practical List of Object Oriented Programming with C

Computer Programming C++ (wg) CCOs

Other Loop Options EXAMPLE

Euclid s algorithm, 133

ALIGARH MUSLIM UNIVERSITY Department of Computer Science. JAVA Lab Assignment Course: MCA II nd Semester Academic Session:

Transcription:

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 which accept two numbers and print their sum 4 Write a program which accept temperature in Fahrenheit and print it in centigrade. 5 Write a program which accept principle, rate and time from user and print the simple interest. 6 Write a program which accepts a character and display its ASCII value 7 Write a program to swap the values of two variables 8 Write a program to calculate area of circle 9 Write a program to check whether the given number is positive or negative (using? : ternary operator ) 10 Write a program which accepts amount as integer and display total number of Notes of Rs. 500, 100, 50, 20, 10, 5 and 1.

Topic: Control Structure 1 Any integer is input by the user. Write a program to find out whether it is an odd number or even number 2 Write a program to calculate the total expenses. Quantity and price per item are input by the user and discount of 10% is offered if the expense is more than 5000 3 Any year is input by the user. Write a program to determine whether the year is a leap year or not. 4 In a company an employee is paid as under: If his basic salary is less than Rs. 1500, then HRA = 10% of basic salary and DA = 90% of basic salary.if his salary is either equal to or above Rs. 1500, then HRA = Rs. 500 and DA = 98% of basic salary. If the employee's salary is input by the user write a program to find his gross salary. 5 Write a program to calculate the monthly telephone bills as per the following rule: Minimum Rs. 200 for upto 100 calls. Plus Rs. 0.60 per call for next 50 calls. Plus Rs. 0.50 per call for next 50 calls. Plus Rs. 0.40 per call for any call beyond 200 calls 6 Write a program to print number from 1 to 10. 7 Write a program to calculate the sum of first 10 natural number 8 Two numbers are entered through the keyboard. Write a program to find the value of one number raised to the power of another 9 Write a program to reverse any given integer number. 10 Write a program to sum of digits of given integer number 11 Write a program to check given number is prime or not.

12 Write a program to calculate HCF of Two given number 13 Write a program to print all Armstrong numbers between 1 and 500. If sum of cubes of each digit of the number is equal to the number itself, then the number is called an Armstrong number. For example, 153 = ( 1 * 1 * 1 ) + ( 5 * 5 * 5 ) + ( 3 * 3 * 3 ) 14 Write a program to print Fibonacci series of n terms where n is input by user 0 1 1 2 3 5 8 13 24... 15 Compute the natural logarithm of 2, by adding up to n terms in the series 1-1/2 + 1/3-1/4 + 1/5 -... 1/n where n is a positive integer and input by user. 16 Write C++ program to print following pattern: i) ii) * ** *** **** ***** iii) * ** *** **** ***** 17 Write a program to compute sinx for given x. The user should supply x and a positive integer n. We compute the sine of x using the series and the computation should use all terms in the series up through the term involving x sin x = x - x 3 /3! + x 5 /5! - x 7 /7!+x 9 /9!...

Topic: User Defined Functions 1 Write a C++ program using function which accept two integers as an argument and return its sum. Call this function from main( ) and print the results in main( ). 2 Write a function to calculate the factorial value of any integer as an argument. Call this function from main( ) and print the results in main( ). 3 Write a function that receives two numbers as an argument and display all prime numbers between these two numbers. Call this function from main( ). 4 Raising a number to a power p is the same as multiplying n by itself p times. Write a function called power that takes two arguments, a double value for n and an int value for p, and return the result as double value. Use default argument of 2 for p, so that if this argument is omitted the number will be squared. Write the main function that gets value from the user to test power function. 5 Write a program that lets the user perform arithmetic operations on two numbers. Your program must be menu driven, allowing the user to select the operation (+, -, *, or /) and input the numbers. Furthermore, your program must consist of following functions: 1. Function showchoice: This function shows the options to the user and explains how to enter data. 2. Function add: This function accepts two number as arguments and returns sum. 3. Function subtract: This function accepts two number as arguments and returns their difference. 4. Function multiply: This function accepts two number as arguments and returns product. 5. Function divide: This function accepts two number as arguments and returns quotient.

Topic: Library Functions 1 Write a program to check character entered is alphabet, digit or special character. 2 Write a program which display a number between 10 to 100 randomly 3 Write a program which accept a letter and display it in uppercase letter 4 Write a C++ program to implement the Number Guessing Game. In this game the computer chooses a random number between 1 and 100, and the player tries to guess the number in as few attempts as possible. Each time the player enters a guess, the computer tells him whether the guess is too high, too low, or right. Once the player guesses the number, the game is over. Topic: Array 1 D 1 Write a C++ program to find the sum and average of one dimensional integer array 2 Write a C++ program to swap first and last element of an integer 1-d array. 3 Write a C++ program to reverse the element of an integer 1-D array. 4 Write a C++ program to find the largest and smallest element of an array 5 Write a menu driven C++ program with following option a. Accept elements of an array b. Display elements of an array c. Sort the array using insertion sort method d. Sort the array using selection sort method e. Sort the array using bubble sort method Write C++ functions for all options. The functions should have two parameters name of the array and number of elements in the array. 6 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. 7 Suppose A, B, C are arrays of integers of size M, N, and M + N respectively. The numbers in array A appear in ascending order while the numbers in array B appear in descending order. Write a user defined function in C++ to produce third array C by merging arrays A and B in ascending order. Use A, B and C as arguments in the function.

Topic: Array 2 D 1 Write a menu driven C++ program to do following operation on two dimensional array A of size m x n. You should use user-defined functions which accept 2-D array A, and its size m and n as arguments. The options are: To input elements into matrix of size m x n To display elements of matrix of size m x n Sum of all elements of matrix of size m x n To display row-wise sum of matrix of size m x n To display column-wise sum of matrix of size m x n To create transpose of matrix B of size n x m 2 Write user defined functions for square matrix to calculate 1. Left diagonal sum 2. Right diagonal sum 3 Write a user defined function named Upper-half() which takes a two dimensional array A, with size N rows and N columns as argument and prints the upper half of the array. 4 Write a program to add two array A and B of size m x n. Topic: Structure 1 Declare a structure to represent a complex number (a number having a real part and imaginary part). Write C++ functions to add, subtract, multiply and divide two complex numbers. 2 An array stores details of 25 students (rollno, name, marks in three subject). Write a program to create such an array and print out a list of students who have failed in more than one subject.