Friday, January 22, 2021

29. Write a program that will read 10 integers from user and store them in an array. Implement array using pointers. The program will print the array elements in ascending and descending order.

 29. Write a program that will read 10 integers from user and store them in an array. Implement array using pointers. The program will print the array elements in ascending and descending order.

BUBBLE SORT TECHNIQUE:







C++ CODE: 

28. Write a function that reverses the elements of an array in place. The function must accept only one pointer value and return void.

 28. Write a function that reverses the elements of an array in place. The function must accept only one pointer value and return void.




27. Copy the contents of one text file to another file, after removing all whitespaces.

 27. Copy the contents of one text file to another file, after removing all whitespaces.



26. Write a program to retrieve the student information from file created in previous question and print it in following format: Roll No. Name Marks

 26. Write a program to retrieve the student information from file created in previous question and print it in following format: Roll No. Name Marks




25. Create a structure Student containing fields for Roll No., Name, Class, Year and Total Marks. Create 10 students and store them in a file.

 25. Create a structure Student containing fields for Roll No., Name, Class, Year and Total Marks. Create 10 students and store them in a file.



24. Create a class Box containing length, breath and height. Include following methods in it: a) Calculate surface Area b) Calculate Volume c) Increment, Overload ++ operator (both prefix & postfix) d) Decrement, Overload -- operator (both prefix & postfix) e) Overload operator == (to check equality of two boxes), as a friend function f) Overload Assignment operator g) Check if it is a Cube or cuboid Write a program which takes input from the user for length, breath and height to test the above class.

 24. Create a class Box containing length, breath and height. Include following methods in it:

              a) Calculate surface Area

              b) Calculate Volume

              c) Increment, Overload ++ operator (both prefix & postfix)

              d) Decrement, Overload -- operator (both prefix & postfix)

              e) Overload operator == (to check equality of two boxes), as a friend function

              f) Overload Assignment operator

              g) Check if it is a Cube or cuboid Write a program which takes input from the user for                             length, breath and height to test the above class.




23. Create a class Triangle. Include overloaded functions for calculating area. Overload assignment operator and equality operator.

 23. Create a class Triangle. Include overloaded functions for calculating area. Overload assignment operator and equality operator.




22. Create the Person class. Create some objects of this class (by taking information from the user). Inherit the class Person to create two classes Teacher and Student class. Maintain the respective information in the classes and create, display and delete objects of these two classes (Use Runtime Polymorphism).

 22. Create the Person class. Create some objects of this class (by taking information from the user). Inherit the class Person to create two classes Teacher and Student class. Maintain the respective information in the classes and create, display and delete objects of these two classes (Use Runtime Polymorphism).



21. Create Matrix class using templates. Write a menu-driven program to perform following Matrixoperations (2-D array implementation): a) Sum b) Difference c) Product d) Transpose

 21. Create Matrix class using templates. Write a menu-driven program to perform following Matrixoperations (2-D array implementation): a) Sum b) Difference c) Product d) Transpose





Wednesday, January 6, 2021

COMPUTER GRAPHICS question set (PAKHIRA)

  CHAPTER 9

1. window and view port

2. clipping

3. Cohen_Sutherland algo

4. Midpoint subdivision'

5. Sutherland-Hodgman algo