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)
185 views
Assignment - C+++ - No - 01 To 16
Uploaded by
TECH ZONE
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Assignment_C+++_No_01 to 16 For Later
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)
185 views
Assignment - C+++ - No - 01 To 16
Uploaded by
TECH ZONE
AI-enhanced title
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
Download now
Download
Save Assignment_C+++_No_01 to 16 For Later
Carousel Previous
Carousel Next
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
DSA-251 by Parikh Jain
PDF
No ratings yet
DSA-251 by Parikh Jain
22 pages
7 Input and Output in C Language Lyst7377
PDF
100% (1)
7 Input and Output in C Language Lyst7377
21 pages
GOLD Core Java Durga Sir - Java - Notes - Teachmint
PDF
No ratings yet
GOLD Core Java Durga Sir - Java - Notes - Teachmint
459 pages
Class Notes Ppts Day-02
PDF
No ratings yet
Class Notes Ppts Day-02
13 pages
Volume 2 Final
PDF
No ratings yet
Volume 2 Final
199 pages
SQL by Jai Shankar Sir
PDF
No ratings yet
SQL by Jai Shankar Sir
158 pages
DBT Notes PDF
PDF
No ratings yet
DBT Notes PDF
79 pages
Vtu 4th Sem Design and Analysis of Algorithm Observation
PDF
100% (1)
Vtu 4th Sem Design and Analysis of Algorithm Observation
96 pages
Interview Question Collection Framework PDF
PDF
No ratings yet
Interview Question Collection Framework PDF
13 pages
Java
PDF
No ratings yet
Java
160 pages
DS Notes
PDF
No ratings yet
DS Notes
218 pages
Java Assignment-I
PDF
No ratings yet
Java Assignment-I
1 page
Subba Raju Sir (HTML 5) PDF
PDF
No ratings yet
Subba Raju Sir (HTML 5) PDF
270 pages
Python Material Basic Concepts
PDF
No ratings yet
Python Material Basic Concepts
366 pages
HTML Notes
PDF
No ratings yet
HTML Notes
44 pages
J2EE Lab Manual
PDF
No ratings yet
J2EE Lab Manual
83 pages
PDF Core Java With SCJP Ocjp Notes by Durga
PDF
No ratings yet
PDF Core Java With SCJP Ocjp Notes by Durga
58 pages
Java Input/Output - Text and Binary Streams: Introduction To Data Streams
PDF
No ratings yet
Java Input/Output - Text and Binary Streams: Introduction To Data Streams
10 pages
Git Workshop - PDF Version 1-Rotated
PDF
No ratings yet
Git Workshop - PDF Version 1-Rotated
36 pages
Python Class Links From Naresh IT
PDF
No ratings yet
Python Class Links From Naresh IT
3 pages
18CS644-NOTES Module 2
PDF
100% (1)
18CS644-NOTES Module 2
25 pages
Android Training Course, Best Android Training Institute Hyderabad, India - NareshIT
PDF
100% (2)
Android Training Course, Best Android Training Institute Hyderabad, India - NareshIT
5 pages
New KV - Rao Core Java PDF
PDF
No ratings yet
New KV - Rao Core Java PDF
382 pages
Core Advanced Java & J2EE Syllabus
PDF
No ratings yet
Core Advanced Java & J2EE Syllabus
5 pages
Java Programming Lab Manual-R18
PDF
No ratings yet
Java Programming Lab Manual-R18
53 pages
SCJP Dumps
PDF
75% (4)
SCJP Dumps
24 pages
JAVA - Coding
PDF
No ratings yet
JAVA - Coding
22 pages
Spring Boot - H2 DB Spring Boot - JPA+H2 DB: Page 1 of 15
PDF
No ratings yet
Spring Boot - H2 DB Spring Boot - JPA+H2 DB: Page 1 of 15
15 pages
Durga Core Java
PDF
50% (2)
Durga Core Java
2 pages
Sunbeam Corejava Notes
PDF
No ratings yet
Sunbeam Corejava Notes
80 pages
JDBC JDBC Tutorial
PDF
No ratings yet
JDBC JDBC Tutorial
27 pages
Exception Handling in Java
PDF
No ratings yet
Exception Handling in Java
11 pages
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
PDF
No ratings yet
NARESH IT FINAL YEAR PROJECT TITLES - 2010-2011e
66 pages
CRT Aptitude Paid
PDF
No ratings yet
CRT Aptitude Paid
107 pages
Java Package PDF
PDF
No ratings yet
Java Package PDF
2 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
Java8 Study Guide
PDF
No ratings yet
Java8 Study Guide
11 pages
Programming The World Wide Web by Robert W Sebesta
PDF
No ratings yet
Programming The World Wide Web by Robert W Sebesta
6 pages
New NTJ Spring PDF
PDF
100% (1)
New NTJ Spring PDF
282 pages
Question Bank BCS403
PDF
No ratings yet
Question Bank BCS403
5 pages
Rapid Fire Sunbeam
PDF
No ratings yet
Rapid Fire Sunbeam
10 pages
Mathematics of Cryptography: Part I: Modular Arithmetic, Congruence, and Matrices
PDF
No ratings yet
Mathematics of Cryptography: Part I: Modular Arithmetic, Congruence, and Matrices
82 pages
JSP (Nagoor Babu)
PDF
No ratings yet
JSP (Nagoor Babu)
3 pages
OOP - I GTU Study Material Presentations Unit-1 07022022102854PM
PDF
No ratings yet
OOP - I GTU Study Material Presentations Unit-1 07022022102854PM
59 pages
OOPS USING JAVA Unit-3
PDF
100% (1)
OOPS USING JAVA Unit-3
37 pages
C++ Ex2
PDF
No ratings yet
C++ Ex2
2 pages
OOPS Karan 1
PDF
No ratings yet
OOPS Karan 1
8 pages
PraList C++
PDF
No ratings yet
PraList C++
5 pages
Oops
PDF
No ratings yet
Oops
8 pages
Labmanual
PDF
No ratings yet
Labmanual
54 pages
OOPs With C++ Laboratory Manual 230516 123658
PDF
No ratings yet
OOPs With C++ Laboratory Manual 230516 123658
42 pages
CPP - Journal1 Amruta
PDF
No ratings yet
CPP - Journal1 Amruta
102 pages
CPP Practical File
PDF
No ratings yet
CPP Practical File
36 pages
MTECH OOT 1stsem
PDF
No ratings yet
MTECH OOT 1stsem
30 pages
Psoop Lab Internal Codes
PDF
No ratings yet
Psoop Lab Internal Codes
32 pages
EEE2109 Final Fall2020 v2
PDF
No ratings yet
EEE2109 Final Fall2020 v2
5 pages
Lab Programs
PDF
No ratings yet
Lab Programs
16 pages
APznzaYLsRd8Svkd4QP9GWRBjHWl6JF3tP-DIYCGU7pFD1X6qtAsz7ZX2kQOnid64S7jS975QD-L3XYk3YHaX6yh1fleocZkfr_LBd4bz90MlkJYyWn0n6Pl0YDIRgXKoH-xTdDz_mOXiqy_w72yPfSqcur8RAReuxRPEWSd059J9EaSwx0aY9hUllNjWsY5MwrUpt0qybtFmjwI-kbNsr
PDF
No ratings yet
APznzaYLsRd8Svkd4QP9GWRBjHWl6JF3tP-DIYCGU7pFD1X6qtAsz7ZX2kQOnid64S7jS975QD-L3XYk3YHaX6yh1fleocZkfr_LBd4bz90MlkJYyWn0n6Pl0YDIRgXKoH-xTdDz_mOXiqy_w72yPfSqcur8RAReuxRPEWSd059J9EaSwx0aY9hUllNjWsY5MwrUpt0qybtFmjwI-kbNsr
4 pages
S.No Date Name of The Experiment Faculty Signature
PDF
No ratings yet
S.No Date Name of The Experiment Faculty Signature
76 pages
Lab1 PDF
PDF
No ratings yet
Lab1 PDF
6 pages