Open navigation menu
Close suggestions
Search
Search
en
Change Language
Upload
Sign in
Sign in
Download free for days
0 ratings
0% found this document useful (0 votes)
408 views
16 pages
Assignment - C+++ - No - 01 To 16
Uploaded by
TECH ZONE
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Download
Save
Save Assignment_C+++_No_01 to 16 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
0 ratings
0% found this document useful (0 votes)
408 views
16 pages
Assignment - C+++ - No - 01 To 16
Uploaded by
TECH ZONE
AI-enhanced title
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content,
claim it here
.
Available Formats
Download as PDF or read online on Scribd
Carousel Previous
Carousel Next
Download
Save
Save Assignment_C+++_No_01 to 16 For Later
0%
0% found this document useful, undefined
0%
, undefined
Embed
Share
Print
Report
Download now
Download
You are on page 1
/ 16
Search
Fullscreen
Saurabh Shukla Classes C++ Language Assignment-1 | Warm-up Write a C++ program to print Hello World on the Screen Write a C++ program to print Hello in first line and World in second line Write a C++ program to add two numbers taken from user. Write a C++ program to calculate area of circle Write a C++ program to calculate area of a rectangle Write a C++ program to calculate volume of a cuboid Write a C++ program to calculate average of three numbers. Write a C++ program to swap values of two int variables. Pp Onan rwner Write a C++ program which takes a character from user and display its ASCII code. 10. Write a C++ program to calculate simple interest.Saurabh Shukla Classes C++ Language Assignment-2 | Decision Control pena rw Write a C++ program to check whether a given number is divisible by 7 or not. Write a C++ program to check whether a triangle is right angled triangle or not. Takes lengths of the sides from the user. Write a C++ program to check whether a given number is a valid octal number or not. Write a C++ program to find nature of roots of quadratic equation Write a C++ program to compare two numbers. Write a C++ program to check whether a given number is positive, negative or zero. Write a C++ program to check whether a given number is even or odd Write a C++ program to check whether a given yearis a leap year or not. Write a C++ program to find the greater among 3 given numbers. . Write a C++ program to check whether a given character is a digit, lowercase alphabet, uppercase alphabet or a special character.Saurabh Shukla Classes C++ Language Assignment-3 | Loops PEN ansenp Write a C++ program to print first N natural numbers. Write a C++ program to print first N natural numbers in reverse order Write a C++ program to print first N even natural numbers Write a C++ program to print first N odd natural number in reverse order Write a C++ program to calculate sum of first N natural numbers Write a C++ program to print table of user’s choice Write a C++ program to calculate sum of squares of first N natural numbers. Write a C++ program to calculate factorial of a number Write a C++ program to count digits in a given number 10. Write a C++ program to calculate the sum of digits in a given numberSaurabh Shukla Classes C++ Language Assignment-4 | More on Loops Write a C++ program to check whether a given number is Prime or not. Write a C++ program to print all Prime number between two given numbers Write a C++ program to print first N terms of Fibonacci series. Write a C++ program to calculate LCM of two numbers Write a C++ program to calculate HCF of two numbers Write a C++ program to find the highest value digit ina given number Write a C++ program to print binary of a given decimal number Write a C++ program to print octal of a given decimal number penny rwn Pp Write a C++ program to reverse a number 10. Write a C++ program to calculate x power y, where values of x and y are given by user.Saurabh Shukla Classes Ctt Language Assignment-5 | functions 1. Write a function to calculate area of circle. (TSRS) 2. Write a function to check whether a given number is even or odd. Return 1 if number is even, otherwise return 0. (TSRS) 3. Write a function to check whether a given number is Prime or not. Return 1 if number is Prime, otherwise return O. (TSRS) Write a function to find next Prime number of a given number. (TSRS) Write a function to print all prime numbers between two given numbers. (TSRS) Write a function to calculate factorial of a number. (TSRS) Write a function to calculate permutation of arranging r items out of n items. (TSRS) Write a function to calculate combinations of selecting r items out of n items. (TSRS) |. Write a function to print Pascal Triangle. (TSRN) 10. Write a function to calculate LCM of two numbers. (TSRS) 11. Write a function to calculate HCF of two numbers. (TSRS) 12. Write a function to print first N terms of Fibonacci series. (TSRN) PP NOP TSRS: Take Something Return Something TSRN: Take Something Returns NothingAssignment-6 | recursion Write a recursive function to print first N natural numbers Write a recursive function to print first N natural numbers in reverse order Write a recursive function to print first N odd natural numbers Write a recursive function to print first N odd natural numbers in reverse order Write a recursive function to print first N even natural numbers Write a recursive function to print first N even natural numbers in reverse order Write a recursive function to print squares of first N natural numbers. Write a recursive function to calculate sum of first N natural numbers Write a recursive function to calculate sum of squares of first N natural numbers: . Write a recursive function to calculate sum of first n odd natural numbers . Write a recursive function to calculate sum of first N even natural numbers . Write a recursive function to calculate factorial of a number . Write a recursive function to print binary of a decimal number . Write a recursive function to print octal of a decimal numberSaurabh Shukla Classes C++ Language Assignment-7 | Classes and Objects 1. Define a class Complex to represent a complex number. Declare instance member variables to store real and imaginary part of a complex number, also define instance member functions to set values of complex number and print values of complex number. 2. Define a class Time to represent Time (like 3 hr 45 min 20 sec). Declare appropriate number of instance member variables and also define instance member functions to set values for time and display values of time. 3. Define a class Box to represent a cuboid. Declare instance member variables to store dimensions of the box and also define instance member functions to set dimensions of the box and display dimensions of the Box. Define one more instance member function which returns the volume of caller object of Box.Saurabh Shukla Classes C++ Language Assignment-8 | Arrays 1. Define a class Array, which contains an int array of size 10 as instance member variable.Now define the following member functions to access this array: a. b. c d e. f. 8B. inputArrayElements() findMaxElement() findMinElement!) sort() editElement(int index, int newData) sumOfelement() averageOfElements() 2. Define a class Employee with empid, name and salary as instance member variable. Define following instance member functions in it: a. b. > oao 8B. setEmployeeld(int id) setEmployeeName(char n{]) setEmployeeSalary(float s) showEmployee() getSalary() getEmpld() getName() 3. Create an array of 10 Employees (use Employee class of que 2). Define following functions: a. b. c d. displayEmployees(Employee []) sortEmployeesBySalary(Employee []) sortEmployeeByName(Employee []) sortEmployeeByEmpld(Employee [])Saurabh Shukla Classes C++ Language Assignment-9 | static 1. Define a class Account, which contains following instance member variables a. account_no b. balance Also declare static member variable for rate of interest. Now define following member functions. (Analyze and decide which function has to be static and which has to be instance member) c. setBalance() d. setAccountNo() e. getBalance() f. getAccountNo() g. setRateOfinterest() h. getRateOfinterest()Saurabh Shukla Classes C++ Language Assignment-10 | Member Functions Define a class Complex with instance member variables to store real and imaginary part. Define member functions to set data and show deta. Also define functions to perform various mathematical operations between two objects of Complex. Following is the list of operations: a. addition b. subtraction c. mul 2. Define a class Time with instance member variables of hour min and second. Define setTime and showTime functions. Also define normalize function to make object data in standard format (min and sec should be less than 60). Also define functions for the following operations: a. Addition b. Subtraction 3. Define a class Result with instance member variables resulted, total_attempt, net_right, net_wrong, marks_for_right, marks_for_wrong. Define the following member functions: a. setResult() - it take 5 arguments for all instance variables. Set default arguments for marks_for_right and marks_for_wrong. b. showResult() 4. Define a class Operations, with static member pi with value 3.14. Define following functions a. Overloaded versions of area to calculate area of circle and area of rectangle b. Overloaded versions of add to calculate sum of two int values, sum of two float values, concatenate two stringsAssignment-11 | Constructor 1. Define a class Complex with instance member variables to store real and imaginary part. Define member functions to set data and show data. Also define two constructors, one takes wo arguments to set values of real and imaginary part, second takes no argument. 2. Define a class Box with instance member variables length, breadth and height. Define instance member functions setDimensions() and showDimensions(). Also define three constructors: 2. Non-parameterized constructor. b. Takes three arguments for three dimensions ©. Take one argument which is for all three dimensionsSaurabh Shula Classes G++ Language Assignment-12 | Operator Overloading, 1 Define a class Camplex with instance member variables to store real and imaginary part. Define member functions to set data and shaw data. Qverload following operators in the class a. + (binary + to add nwo complex objects) b. - (binary -to subtract complex objects) c. * (binary * to multiply complex objects) d. == (relational operator to compare two complex objects) Define a class Time with hour, min and sec as instance member variables. Define instance member functions setTime() and showTime(). Also overload following operators: a. + (binary + to add two Time objects) b. — (binary — to find difference between two Time objects) ¢. > (relational operator to compare two Time Objects)Saurabh Shukla Classes C++ Language Assignment-13 | Operator Overloading of unary operators 4 Define a class Complex with instance member variables to store real and imaginary part. Define member functions to set data and show data. Overload following operators in the class a. (unary -to negate the value of complex object) b, ++ (Pre-increment operator ++ } c. ++ (Post-increment operator ++) Define a class Time with hour, min and sec as instance member variables. Define instance member functions setTime() and showTime(). Also overload following operators: a. | (unary ! to set Time 0:0:0 if non zero time or set Time 1:0:0 if already zero) b. ++ (Pre-increment operator +4, increases 1 sec) cH (Post crement operator +4, increases 1 sec)‘Saurabh Shukla Classes G++ Language Assignment-14 | Pointers 1. Define a class LinkedList to implement linked list data structure, Create appropriate member variables and following member functions: a. additemAtstart() additemAtLast() deleteFirstltem() deleteLastitem() viewListitems() Constructor and destructor‘Saurabh Shukla Classes C++ Language Assignment-15 | Inheritance 1 Define a class Person with name and age as private instance member variables. Define public member functions setName() getName(), setAge(), getAge(). Now define derived class of Person, with the name Employee. Class Employee will have empid and salary as private instance member variables. Now define 8 mechanism to automatically generate empid for every new employee (define this function as protected member). Also define following pul Employee class member function: a. setémployeeData() b. showEmployeeData() c. countEmployee()Saurabh Shukla Classes Cit Language Assignment-16 | File Handling vpuNe Write a program to copy one file data and write into another file. ‘Write a program to count words in a file Write a program to search a word in a file ‘Write a program to count lines in a CPP fie rite a program of book record management, Define a class Book with booki price as instance member variables. Also define following functions: a. inputBook() b. showBook() c.storeBook!) 4. viewAllBooks() ©. searchBook() f deleteBook() & editBook()
You might also like
OOPS Karan 1
PDF
No ratings yet
OOPS Karan 1
8 pages
Web Technology-Lab-Manual III-II r22 Updated 24
PDF
No ratings yet
Web Technology-Lab-Manual III-II r22 Updated 24
114 pages
Unit IV Configuration Management Using Ansible
PDF
No ratings yet
Unit IV Configuration Management Using Ansible
41 pages
(Tcs MCQS) : C Programming Language by K.V.Ramana Naresh Technologies
PDF
No ratings yet
(Tcs MCQS) : C Programming Language by K.V.Ramana Naresh Technologies
28 pages
Android Application Development
PDF
No ratings yet
Android Application Development
156 pages
Java Unit 1
PDF
No ratings yet
Java Unit 1
139 pages
Java Notes Apna
PDF
No ratings yet
Java Notes Apna
14 pages
The Collections FRAMEWORK (Java - Util) : Part-A
PDF
No ratings yet
The Collections FRAMEWORK (Java - Util) : Part-A
47 pages
Research Paper On DSA
PDF
No ratings yet
Research Paper On DSA
6 pages
Database Management SPPU Unit 1
PDF
No ratings yet
Database Management SPPU Unit 1
6 pages
python-notes-BCC-302 (Unit - 05)
PDF
No ratings yet
python-notes-BCC-302 (Unit - 05)
25 pages
7 Input and Output in C Language Lyst7377
PDF
100% (1)
7 Input and Output in C Language Lyst7377
21 pages
DSA Notes
PDF
No ratings yet
DSA Notes
84 pages
DBMS Lab Manual
PDF
No ratings yet
DBMS Lab Manual
73 pages
FSD Unit III
PDF
100% (1)
FSD Unit III
36 pages
Object Oriented Programming Through Java
PDF
No ratings yet
Object Oriented Programming Through Java
130 pages
PHP Data Types: Scalar Types
PDF
No ratings yet
PHP Data Types: Scalar Types
4 pages
Software Engineering Notes
PDF
No ratings yet
Software Engineering Notes
25 pages
Syllabus OOPJ
PDF
No ratings yet
Syllabus OOPJ
2 pages
Module 2 Collection Framework
PDF
No ratings yet
Module 2 Collection Framework
25 pages
SQL by Jai Shankar Sir
PDF
No ratings yet
SQL by Jai Shankar Sir
158 pages
18CS42 Design and Analysis of Algorithms
PDF
No ratings yet
18CS42 Design and Analysis of Algorithms
16 pages
Unit-4 - OOPS With Java
PDF
No ratings yet
Unit-4 - OOPS With Java
8 pages
Vtu 4th Sem Design and Analysis of Algorithm Observation
PDF
100% (1)
Vtu 4th Sem Design and Analysis of Algorithm Observation
96 pages
Cloud Computing Lab Manual-New
PDF
No ratings yet
Cloud Computing Lab Manual-New
150 pages
Java Lab Manual: Aurora'S PG College Moosarambagh Mca Department
PDF
No ratings yet
Java Lab Manual: Aurora'S PG College Moosarambagh Mca Department
97 pages
Serilization
PDF
No ratings yet
Serilization
9 pages
DAA 2marks With Answers
PDF
No ratings yet
DAA 2marks With Answers
11 pages
Data Structure Syllabus
PDF
No ratings yet
Data Structure Syllabus
4 pages
Web Tech
PDF
No ratings yet
Web Tech
20 pages
PPL I-GGoyal U2.1 Structured - Data - Objects 2022-11-18 20 - 07 Office Lens
PDF
100% (1)
PPL I-GGoyal U2.1 Structured - Data - Objects 2022-11-18 20 - 07 Office Lens
49 pages
Collection Framework in JAVA
PDF
No ratings yet
Collection Framework in JAVA
10 pages
Daa Lab Manual
PDF
No ratings yet
Daa Lab Manual
60 pages
Hbase PPT PDF
PDF
No ratings yet
Hbase PPT PDF
100 pages
Java Lab Manual
PDF
No ratings yet
Java Lab Manual
26 pages
OOPs Interview Questions
PDF
No ratings yet
OOPs Interview Questions
26 pages
7.CS6201 - DPSD
PDF
No ratings yet
7.CS6201 - DPSD
160 pages
Last Minute Revision Notes For C++Programming Exam
PDF
No ratings yet
Last Minute Revision Notes For C++Programming Exam
33 pages
Software Engineering (Syllabus)
PDF
No ratings yet
Software Engineering (Syllabus)
3 pages
Distributed Databases: Course Code:13IT1109 L TPC 4 0 0 3
PDF
No ratings yet
Distributed Databases: Course Code:13IT1109 L TPC 4 0 0 3
3 pages
Laboratory Manual: Silver Oak College of Engineering and Technology
PDF
No ratings yet
Laboratory Manual: Silver Oak College of Engineering and Technology
27 pages
Java - Lab - Manual-21csl35 - Skit
PDF
No ratings yet
Java - Lab - Manual-21csl35 - Skit
30 pages
Dbms Co Po Mapping Justification
PDF
No ratings yet
Dbms Co Po Mapping Justification
3 pages
Industrial Extreme Programming: Submitted By: Group 3 Submitted To
PDF
No ratings yet
Industrial Extreme Programming: Submitted By: Group 3 Submitted To
7 pages
Data Structures Unit 2 Notes
PDF
No ratings yet
Data Structures Unit 2 Notes
51 pages
Unit - 2 Array: Linear Data Structure
PDF
No ratings yet
Unit - 2 Array: Linear Data Structure
14 pages
Dbms Lab Manual
PDF
50% (2)
Dbms Lab Manual
99 pages
MCA 4th Sem ADA Lab Mannual
PDF
No ratings yet
MCA 4th Sem ADA Lab Mannual
26 pages
C++ Ex2
PDF
No ratings yet
C++ Ex2
2 pages
Data Structures and Algorithms Made Easy: Narasimha Karumanchi
PDF
No ratings yet
Data Structures and Algorithms Made Easy: Narasimha Karumanchi
12 pages
Unit 4 Notes
PDF
No ratings yet
Unit 4 Notes
46 pages
Question Bank 1to11
PDF
No ratings yet
Question Bank 1to11
19 pages
Lab 2
PDF
No ratings yet
Lab 2
6 pages
Core Java Syllabus: Bishnu Charan Barik
PDF
No ratings yet
Core Java Syllabus: Bishnu Charan Barik
6 pages
Practice Assignment 11 Sol 12453
PDF
100% (1)
Practice Assignment 11 Sol 12453
6 pages
Java Assignment-I
PDF
No ratings yet
Java Assignment-I
1 page
CO4752 Web Development Assignment (2020 A) : Learning Outcomes Assessed
PDF
No ratings yet
CO4752 Web Development Assignment (2020 A) : Learning Outcomes Assessed
3 pages
Database Management Systems
PDF
No ratings yet
Database Management Systems
2 pages
Assignment 1 Answer
PDF
0% (1)
Assignment 1 Answer
11 pages
Leftist Trees Extended Binary Trees
PDF
No ratings yet
Leftist Trees Extended Binary Trees
9 pages