SlideShare une entreprise Scribd logo
1  sur  9
Télécharger pour lire hors ligne
Computer Science (083)
                               Class-XII(2008-09)
                                 List of Programs

  1. Write a function to generate the following series using functions passing the
     required parameters:-
        a. 1+x1/1! + x2/2! + x3/3!.........xn/n!
        b. 1+x2/3!-x3/4!.........xn/n+1!
        c. 1-x2/3!+x3/4!.........xn-1/n!
STRUCTURES
  2. Write a program to accept the data of a student having the following
     structure:-
   Roll    Name                   Address               Father’s      Marks in 5
   No.                                                  Name          Subjects
           Last     First         Add1 Add2 Pin
           Name Name                               Code
     And Display the following menu:-
        o Merit List Generation: - should have the roll no., name, marks in 5
            subjects, total and average.
        o Grade card Generation: - should have roll no., name, total and grade.
            Criteria of grade are: -
                        Average              Grade
                          >=90                   A
                      <90 and >=75               B
                      <75 and >=60               C
                      <60 and >=40               D
                           <40                   F

                            ENUMERATED DATA TYPE
   3. Write a program to show different rainbow colors of corresponding to the
      entered code using enumerated data type.

                                       MACROS
   4. Write a program to define following macro and their implementation:
                 • Area of rectangle
                 • Area of square
                 • Area of triangle
                 • Constant Max = 100
                 CLASSES
   5. Write a program to accept an array and display the following menu: -
        o Insertion Sort.
        o Binary search
6. To accept 2 arrays and display the following menu: -
          o Merge 2-sorted arrays.
          o Even-Odd Sorting.
          o Negative-Positive Sorting.
   7. To accept a 2-D array and display the following menu: -
         o Row total.
         o Column total.
         o Lower Triangle 1 and 2.
         o Upper Triangle 1 and 2.
   8. Write program to accept a string and display the following menu with out using
      built-in functions: -
           o Palindrome or not.
           o Frequency Table.
           o Change case.
           o String Length.
   9. Write a program to store the record of an employee with the following details:
      -
   Private members:
   Data members
                             EmpNo       Integer
                              Name     Character
                            Address    Character
                            Pin code   Character
                         Basic Salary     Float
                           HRA Rate       Float
                            DA Rate       Float
                            PF Rate       Float
                              HRA         Float
                               DA         Float
                               PF         Float
                            GROSS         Float
                              NET         Float

   • Calculate()      to calculate HRA, DA, PF, GROSS and net salary
Public:
   • Retempno()       function to return empno
   • Retename()       function to return employee name
   • Readdata()       to accept employee no, name, address, pincode, Basic salary,
        HRA rate, DA rate and PF rate. Invoke function calculate to calculate HRA, DA,
        PF, GROSS and net salary
   • Displaydata() to display employee no, name, address, pincode, Basic salary,
        HRA, DA, PF, GROSS and net salary of the employee
Display the following menu :
               o Create. (To accept data of 5 employee)
               o Salary statement. To display payslip of 5 employee
               o Query on employee number. To accept empno and display relevant
                   data
               o Query on employee name. To accept employee name and display
                   relevant data.
   10. Write a program to declare a structure of a student with the following details:
       -
                        Structure student
                         Adm_No            Integer
                          Name            Character
                         Address          Character
                         Pin Code         Character
                           Class           Integer
                  Marks in 5 Subjects       Float
                           Total            Float
                         Average            float
                          Grade           character
      Create a class Marks
private
       • object of the above structure
       • calculate() to calculate total, average and grade
Public member
   • Readdata()         to accept Adm_No, Name, Address, Pin Code, Class and invoke
       calculate function
   • Displaydata() to display Adm_No, Name, Address, Pin Code, Class. Total,
       average and grade.

Display the following menu for atleast 5 students (use functions): -
             o Create. To accept data of 5 student
            o Report card to display report card of one student
            o Name list to display data sorted on name
            o Merit List. To generate merit list
CONSTRUCTOR
   11. Write a program to accept the number and compute the factorial.
   12. Write a program to generate Tribonacci series.



                                        POINTERS
   13. Write a program to swap 2 given numbers.
   14. Write a program to create, and display the elements of an integer array.
15. Declare a structure
    struct telephone
    {
       char tno[9];
       char name[10];
    };
     Write the program to do the following :
    • Create an array with 5 elements of telephone type and initialize it with
       telephone nos. and names of your 5 friends.
    • Create a pointer to telephone array
    • Display the telephone details of your 5 friends using pointer.

16. Try the following program illustrating the use of this pointer
    class one
    {     char name[10];
         public:
           one (char * s) // constructor function
            {
               strcpy(name, s);
             }
             one compare(one s)
             {
                 if (strcmp(name,s.name) ==0)
                    return this;
                else
                     return s;
               }
           void display( )
            {
                 cout <<”current calling object is : “<< name;
                 cout << “nPress any key to continue……”;
                 getch( );
             }
      };
int main( )
{
   one obj1(“Obj1”), obj2(“Obj2”), obj3(“Obj1”);
   obj2.display( );
   obj3.display( );
   one *p=obj1.compare(obj2);
   p->display();
   p=obj1.compare(obj3);
   p->display();
}




                                     INHERITANCE
17 Consider the classes:
class person{
   private:
       char name[20];
   protected:
             int age;
    public:
       void readdata();
       void displdata();

};
class employee:public person
{
              char department[20];
       protected:
              float salary;
       public:
              void read();
              void write();
              float retsal { return salary;}
              int retage(){ return age;}
              int retdep(char *d)
              { if (strcmp(d,department) == 0)
                      return 1;
                 else
                      return 0;}
};

Complete the above classes and write main function having 5 employees and display a
menu:
                     1. Create
                     2. Search on the basis of age
                     3. Search on the basis of department
                     4. Search on the basis of salary

                                 FILE HANDLING
   17. Write a program to accept a text file name and display: -
                  Number of characters
 Frequency Table
                       o No of Uppercase character
                       o No of Vowels
                       o No of Digits
                       o No of Words
                 Number of lines
   18. Write a program to accept the text file name and display the following menu: -

          Find and replace a character
          Replace lowercase character with uppercase character
   19. Write a program to accept a source file and target file and display the
       following menu: -
           Copy contents source to target
           Change case of source to target
           Replace many spaces to one space
           Change contents like “AASTHA” to “aaSTHa”

   20. Consider the following class
   class STUD
   {
       int Rno;
       char Name[20];
      public:
       void Enter(){cin>>Rno;gets(Name);}
       void Display(){cout<<Rno<<Name<<endl;}
    };
       Write the program which displays the following menu and allows following file
operations assuming the binary file is containing the objects of the above mentioned
class: -
       • Create
       • Add
       • Delete (Using Two files)
           (Use remove( ) and rename( ) functions)
       • Display
NOTE : Define separate functions for above mentioned operations

   21. Write a program to create an employee class having the following data
       members: -

Private
   Emp_no              Integer
   Name                Character
   Address             Character
Pin Code              Character
  Basic                 Float
  HRA                   Float
  DA                    Float
  PF                    Float
Public
  Readata()             To accept the data
  Retempno()            Function to return employee no.
  Showdata()            To show the data

   And display the following menu: -
      Create
      Add
      Modify (Using one file)
      Search
      Display

NOTE : Define separate functions for above mentioned operations



                                   STACKS and QUEUE
   22.Write a program to perform various stack operations like push(), pop(), display()
      on a STATIC stack.
   23.Write a program to perform various queue operations like insert(), delete(),
      display() on a circular queue array.
   24.Write a program to perform various stack operations like push(), pop(), display()
      on a linked stack having following node structure: -
                               Roll_n    Integer
                               o
                               Age       Integer
                                                        25.Write a program to perform
      various queue operations like insert(), delete(), display() on a linked queue having
      1 integer and 1 floating type data.
                       Struct Node
                       {
                              int x;
                              float y;
                              Node *link;
                       };
   26.Write a program to perform reverse a line-using stack having string to store
      each word.
STRUCTURE QUERY LANGUAGE

   27.Create employee tables having the following: -

Empno                                  Number (4)
Deptno                                 Number (2)
Empname                                Character (20)
Job                                    Character (10)
Manager                                Number (4)
Hire Date                              Date
Salary                                 Number (7,2)
Commission                             Number (7,2)

Query Statements based on that: -
   Create a table
   Insert 5 records
   Display the names of employee whose name starts with “P” or “R”.
   Display information of employee getting between Rs. 2000 and 8000.
   Display information on the basis of dept_no.

   28. Write the outputs of SQL commands given in (h) with the help of the table
       shown.
EmpNo      Name        Job        Mgr       Hiredate Sal            Deptno
Integer    Character Character Float        Date         Float      Integer

       To select all the information of employee of Dept number 20
       Find all employees who are either Clerks or who are earning between 1000
        and 2000.
       To list names of all employees in ascending order of their salary.
       To display employee’s name, Salary, Deptno for only managers.
       To count the number of employees with salary <3000.
       To insert a new row in the Employee table with the following data: 11,
        “MILLER”, “Manager”, 7698, {25/02/98}, 4300, 20.
       Give the output of the following SQL statements: -
                       o Select COUNT(*) from EMPLOYEE.
                       o Select MIN(Salary) from EMPLOYEE where deptno=20
                       o Select SUM(Salary) from EMPLOYEE where
                           department=”Clerk”.
                       o Select AVG(Salary) from EMPLOYEE.
       Consider a table Department having fields as
           Deptno              Deptname
           Integer             Character
o Display name of employees along with their department having deptno
              as 10 or 20.
            o Display total salary of each department.
            o Display total salary of each department whose employee name starts
              with N or P.
            o Display total salary of each department whose total salary > 20000.

   29.Write the SQL command for (a) to (f) on the basis of the table given below
      (DIRECTORY).
                                     DIRECTORY
No.           Fname            Lname          Phone            Address
Integer       Character        Character      Float            Character
       To select all the information of employee of Rohini area.
       Update the database set the phone no. as 7047645 where phone number is
         7057456.
       To create a view called Dir with the following fields-> Fname, Phone and
         Address.
       To display the data for Arpit, Rahul and Kisan.
       To delete the rows where the address is Rohini.
       To delete the table physically.

Contenu connexe

Tendances

Physics Project for class 12 isc Junction and diode
Physics Project for class 12 isc Junction and diodePhysics Project for class 12 isc Junction and diode
Physics Project for class 12 isc Junction and diodeIshani gupta Gupta
 
Strings in c
Strings in cStrings in c
Strings in cvampugani
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python pptPriyanka Pradhan
 
Basic python programs
Basic python programsBasic python programs
Basic python programsRaginiJain21
 
Physics investigatory project on different emf of cell
Physics investigatory project on different emf of cellPhysics investigatory project on different emf of cell
Physics investigatory project on different emf of cellmanumishra20
 
Advanced HTML.PDF
Advanced HTML.PDFAdvanced HTML.PDF
Advanced HTML.PDFRath Smy
 
Computer Science class 12
Computer Science  class 12Computer Science  class 12
Computer Science class 12Abhishek Sinha
 
Introduction to c language | History of C language
Introduction to c language | History of C languageIntroduction to c language | History of C language
Introduction to c language | History of C languagesimplidigital
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C LanguageAryan Ajmer
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programmingTarun Sharma
 
String & its application
String & its applicationString & its application
String & its applicationTech_MX
 
Implementation Of String Functions In C
Implementation Of String Functions In CImplementation Of String Functions In C
Implementation Of String Functions In CFazila Sadia
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In PythonAbhishekKumarMorla
 
Measurement of unknown resistance by using a neon flash lamp and a capacitor3...
Measurement of unknown resistance by using a neon flash lamp and a capacitor3...Measurement of unknown resistance by using a neon flash lamp and a capacitor3...
Measurement of unknown resistance by using a neon flash lamp and a capacitor3...esmaeel21
 

Tendances (20)

Physics Project for class 12 isc Junction and diode
Physics Project for class 12 isc Junction and diodePhysics Project for class 12 isc Junction and diode
Physics Project for class 12 isc Junction and diode
 
Strings in c
Strings in cStrings in c
Strings in c
 
programming with python ppt
programming with python pptprogramming with python ppt
programming with python ppt
 
Data Handling
Data HandlingData Handling
Data Handling
 
Basic python programs
Basic python programsBasic python programs
Basic python programs
 
Programming
ProgrammingProgramming
Programming
 
Physics investigatory project on different emf of cell
Physics investigatory project on different emf of cellPhysics investigatory project on different emf of cell
Physics investigatory project on different emf of cell
 
Advanced HTML.PDF
Advanced HTML.PDFAdvanced HTML.PDF
Advanced HTML.PDF
 
Computer Science class 12
Computer Science  class 12Computer Science  class 12
Computer Science class 12
 
Introduction to c language | History of C language
Introduction to c language | History of C languageIntroduction to c language | History of C language
Introduction to c language | History of C language
 
Programming flowcharts for C Language
Programming flowcharts for C LanguageProgramming flowcharts for C Language
Programming flowcharts for C Language
 
Introduction of c programming
Introduction of c programmingIntroduction of c programming
Introduction of c programming
 
String & its application
String & its applicationString & its application
String & its application
 
Implementation Of String Functions In C
Implementation Of String Functions In CImplementation Of String Functions In C
Implementation Of String Functions In C
 
class 12th computer science project Employee Management System In Python
 class 12th computer science project Employee Management System In Python class 12th computer science project Employee Management System In Python
class 12th computer science project Employee Management System In Python
 
Strings
StringsStrings
Strings
 
String c
String cString c
String c
 
Measurement of unknown resistance by using a neon flash lamp and a capacitor3...
Measurement of unknown resistance by using a neon flash lamp and a capacitor3...Measurement of unknown resistance by using a neon flash lamp and a capacitor3...
Measurement of unknown resistance by using a neon flash lamp and a capacitor3...
 
Python programming : Standard Input and Output
Python programming : Standard Input and OutputPython programming : Standard Input and Output
Python programming : Standard Input and Output
 
Data types
Data typesData types
Data types
 

En vedette

Number system
Number systemNumber system
Number systemaviban
 
CBSE, Grade12, Computer Science, Random Numbers - Notes
CBSE, Grade12, Computer Science, Random Numbers - NotesCBSE, Grade12, Computer Science, Random Numbers - Notes
CBSE, Grade12, Computer Science, Random Numbers - NotesMalathi Senthil
 
Python for class 11 (CBSE Computer science sub code 083)
Python for class 11 (CBSE Computer science sub code 083)Python for class 11 (CBSE Computer science sub code 083)
Python for class 11 (CBSE Computer science sub code 083)Nitin Kumar
 
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVSCBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVSGautham Rajesh
 
+2 Computer Science - Volume II Notes
+2 Computer Science - Volume II Notes+2 Computer Science - Volume II Notes
+2 Computer Science - Volume II NotesAndrew Raj
 
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board ExamsC++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board Examshishamrizvi
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical FileAshwin Francis
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebraGagan Deep
 
CBSE XII Communication And Network Concepts
CBSE XII Communication And Network ConceptsCBSE XII Communication And Network Concepts
CBSE XII Communication And Network ConceptsGuru Ji
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Self-employed
 
CBSE XII Boolean Algebra
CBSE XII Boolean AlgebraCBSE XII Boolean Algebra
CBSE XII Boolean AlgebraGuru Ji
 
Digital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsDigital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsLekashri Subramanian
 

En vedette (14)

Number system
Number systemNumber system
Number system
 
CBSE, Grade12, Computer Science, Random Numbers - Notes
CBSE, Grade12, Computer Science, Random Numbers - NotesCBSE, Grade12, Computer Science, Random Numbers - Notes
CBSE, Grade12, Computer Science, Random Numbers - Notes
 
Boolean expressions
Boolean expressionsBoolean expressions
Boolean expressions
 
Python for class 11 (CBSE Computer science sub code 083)
Python for class 11 (CBSE Computer science sub code 083)Python for class 11 (CBSE Computer science sub code 083)
Python for class 11 (CBSE Computer science sub code 083)
 
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVSCBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
CBSE XII COMPUTER SCIENCE STUDY MATERIAL BY KVS
 
+2 Computer Science - Volume II Notes
+2 Computer Science - Volume II Notes+2 Computer Science - Volume II Notes
+2 Computer Science - Volume II Notes
 
School Management (c++)
School Management (c++) School Management (c++)
School Management (c++)
 
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board ExamsC++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
C++ Notes by Hisham Ahmed Rizvi for Class 12th Board Exams
 
12th CBSE Practical File
12th CBSE Practical File12th CBSE Practical File
12th CBSE Practical File
 
Boolean algebra
Boolean algebraBoolean algebra
Boolean algebra
 
CBSE XII Communication And Network Concepts
CBSE XII Communication And Network ConceptsCBSE XII Communication And Network Concepts
CBSE XII Communication And Network Concepts
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12
 
CBSE XII Boolean Algebra
CBSE XII Boolean AlgebraCBSE XII Boolean Algebra
CBSE XII Boolean Algebra
 
Digital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 unitsDigital logic circuits important question and answers for 5 units
Digital logic circuits important question and answers for 5 units
 

Similaire à Computer Practical

Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy BookAbir Hossain
 
JAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docxJAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docxLucky Ally
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overviewsapdocs. info
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01tabish
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01tabish
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewAshish Kumar
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02tabish
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02wingsrai
 
C programming assignment presentation file
C programming assignment presentation fileC programming assignment presentation file
C programming assignment presentation filesantoshkumarhpu
 
Computing an average mark for four tests Design the algorithm and the.docx
Computing an average mark for four tests  Design the algorithm and the.docxComputing an average mark for four tests  Design the algorithm and the.docx
Computing an average mark for four tests Design the algorithm and the.docxljohn878
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsnoahjamessss
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringscskvsmi44
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsjody zoll
 
Objectives 1. using indirect addressing 2. passing parameters.pdf
Objectives 1. using indirect addressing 2. passing parameters.pdfObjectives 1. using indirect addressing 2. passing parameters.pdf
Objectives 1. using indirect addressing 2. passing parameters.pdffcsondhiindia
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docxoswald1horne84988
 
cmp104 lec 8
cmp104 lec 8cmp104 lec 8
cmp104 lec 8kapil078
 
ANSHUL RANA - PROGRAM FILE.pptx
ANSHUL RANA - PROGRAM FILE.pptxANSHUL RANA - PROGRAM FILE.pptx
ANSHUL RANA - PROGRAM FILE.pptxjeyel85227
 
Write a task that will perform some of the functions performed by a s.docx
 Write a task that will perform some of the functions performed by a s.docx Write a task that will perform some of the functions performed by a s.docx
Write a task that will perform some of the functions performed by a s.docxajoy21
 

Similaire à Computer Practical (20)

Important C program of Balagurusamy Book
Important C program of Balagurusamy BookImportant C program of Balagurusamy Book
Important C program of Balagurusamy Book
 
JAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docxJAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docx
 
ABAP Programming Overview
ABAP Programming OverviewABAP Programming Overview
ABAP Programming Overview
 
Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01Chapter 1abapprogrammingoverview-091205081953-phpapp01
Chapter 1abapprogrammingoverview-091205081953-phpapp01
 
chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01chapter-1abapprogrammingoverview-091205081953-phpapp01
chapter-1abapprogrammingoverview-091205081953-phpapp01
 
Chapter 1 Abap Programming Overview
Chapter 1 Abap Programming OverviewChapter 1 Abap Programming Overview
Chapter 1 Abap Programming Overview
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
C programming assignment presentation file
C programming assignment presentation fileC programming assignment presentation file
C programming assignment presentation file
 
C++
C++C++
C++
 
Computing an average mark for four tests Design the algorithm and the.docx
Computing an average mark for four tests  Design the algorithm and the.docxComputing an average mark for four tests  Design the algorithm and the.docx
Computing an average mark for four tests Design the algorithm and the.docx
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-stringsDevry cis-170-c-i lab-5-of-7-arrays-and-strings
Devry cis-170-c-i lab-5-of-7-arrays-and-strings
 
Devry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and stringsDevry cis 170 c i lab 5 of 7 arrays and strings
Devry cis 170 c i lab 5 of 7 arrays and strings
 
Objectives 1. using indirect addressing 2. passing parameters.pdf
Objectives 1. using indirect addressing 2. passing parameters.pdfObjectives 1. using indirect addressing 2. passing parameters.pdf
Objectives 1. using indirect addressing 2. passing parameters.pdf
 
1 ECE 175 Computer Programming for Engineering Applica.docx
1  ECE 175 Computer Programming for Engineering Applica.docx1  ECE 175 Computer Programming for Engineering Applica.docx
1 ECE 175 Computer Programming for Engineering Applica.docx
 
Python
PythonPython
Python
 
cmp104 lec 8
cmp104 lec 8cmp104 lec 8
cmp104 lec 8
 
ANSHUL RANA - PROGRAM FILE.pptx
ANSHUL RANA - PROGRAM FILE.pptxANSHUL RANA - PROGRAM FILE.pptx
ANSHUL RANA - PROGRAM FILE.pptx
 
Write a task that will perform some of the functions performed by a s.docx
 Write a task that will perform some of the functions performed by a s.docx Write a task that will perform some of the functions performed by a s.docx
Write a task that will perform some of the functions performed by a s.docx
 

Dernier

Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)lakshayb543
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptxmary850239
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for BeginnersSabitha Banu
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxleah joy valeriano
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfJemuel Francisco
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4JOYLYNSAMANIEGO
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationRosabel UA
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...Nguyen Thanh Tu Collection
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Celine George
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxCarlos105
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPCeline George
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYKayeClaireEstoconing
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatYousafMalik24
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptxiammrhaywood
 

Dernier (20)

Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
Visit to a blind student's school🧑‍🦯🧑‍🦯(community medicine)
 
4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx4.16.24 21st Century Movements for Black Lives.pptx
4.16.24 21st Century Movements for Black Lives.pptx
 
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptxLEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
LEFT_ON_C'N_ PRELIMS_EL_DORADO_2024.pptx
 
Full Stack Web Development Course for Beginners
Full Stack Web Development Course  for BeginnersFull Stack Web Development Course  for Beginners
Full Stack Web Development Course for Beginners
 
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptxMusic 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
Music 9 - 4th quarter - Vocal Music of the Romantic Period.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdfGrade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
Grade 9 Quarter 4 Dll Grade 9 Quarter 4 DLL.pdf
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4Daily Lesson Plan in Mathematics Quarter 4
Daily Lesson Plan in Mathematics Quarter 4
 
Activity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translationActivity 2-unit 2-update 2024. English translation
Activity 2-unit 2-update 2024. English translation
 
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
HỌC TỐT TIẾNG ANH 11 THEO CHƯƠNG TRÌNH GLOBAL SUCCESS ĐÁP ÁN CHI TIẾT - CẢ NĂ...
 
Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17Difference Between Search & Browse Methods in Odoo 17
Difference Between Search & Browse Methods in Odoo 17
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptxBarangay Council for the Protection of Children (BCPC) Orientation.pptx
Barangay Council for the Protection of Children (BCPC) Orientation.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
How to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERPHow to do quick user assign in kanban in Odoo 17 ERP
How to do quick user assign in kanban in Odoo 17 ERP
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITYISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
ISYU TUNGKOL SA SEKSWLADIDA (ISSUE ABOUT SEXUALITY
 
Earth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice greatEarth Day Presentation wow hello nice great
Earth Day Presentation wow hello nice great
 
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptxAUDIENCE THEORY -CULTIVATION THEORY -  GERBNER.pptx
AUDIENCE THEORY -CULTIVATION THEORY - GERBNER.pptx
 

Computer Practical

  • 1. Computer Science (083) Class-XII(2008-09) List of Programs 1. Write a function to generate the following series using functions passing the required parameters:- a. 1+x1/1! + x2/2! + x3/3!.........xn/n! b. 1+x2/3!-x3/4!.........xn/n+1! c. 1-x2/3!+x3/4!.........xn-1/n! STRUCTURES 2. Write a program to accept the data of a student having the following structure:- Roll Name Address Father’s Marks in 5 No. Name Subjects Last First Add1 Add2 Pin Name Name Code And Display the following menu:- o Merit List Generation: - should have the roll no., name, marks in 5 subjects, total and average. o Grade card Generation: - should have roll no., name, total and grade. Criteria of grade are: - Average Grade >=90 A <90 and >=75 B <75 and >=60 C <60 and >=40 D <40 F ENUMERATED DATA TYPE 3. Write a program to show different rainbow colors of corresponding to the entered code using enumerated data type. MACROS 4. Write a program to define following macro and their implementation: • Area of rectangle • Area of square • Area of triangle • Constant Max = 100 CLASSES 5. Write a program to accept an array and display the following menu: - o Insertion Sort. o Binary search
  • 2. 6. To accept 2 arrays and display the following menu: - o Merge 2-sorted arrays. o Even-Odd Sorting. o Negative-Positive Sorting. 7. To accept a 2-D array and display the following menu: - o Row total. o Column total. o Lower Triangle 1 and 2. o Upper Triangle 1 and 2. 8. Write program to accept a string and display the following menu with out using built-in functions: - o Palindrome or not. o Frequency Table. o Change case. o String Length. 9. Write a program to store the record of an employee with the following details: - Private members: Data members EmpNo Integer Name Character Address Character Pin code Character Basic Salary Float HRA Rate Float DA Rate Float PF Rate Float HRA Float DA Float PF Float GROSS Float NET Float • Calculate() to calculate HRA, DA, PF, GROSS and net salary Public: • Retempno() function to return empno • Retename() function to return employee name • Readdata() to accept employee no, name, address, pincode, Basic salary, HRA rate, DA rate and PF rate. Invoke function calculate to calculate HRA, DA, PF, GROSS and net salary • Displaydata() to display employee no, name, address, pincode, Basic salary, HRA, DA, PF, GROSS and net salary of the employee
  • 3. Display the following menu : o Create. (To accept data of 5 employee) o Salary statement. To display payslip of 5 employee o Query on employee number. To accept empno and display relevant data o Query on employee name. To accept employee name and display relevant data. 10. Write a program to declare a structure of a student with the following details: - Structure student Adm_No Integer Name Character Address Character Pin Code Character Class Integer Marks in 5 Subjects Float Total Float Average float Grade character Create a class Marks private • object of the above structure • calculate() to calculate total, average and grade Public member • Readdata() to accept Adm_No, Name, Address, Pin Code, Class and invoke calculate function • Displaydata() to display Adm_No, Name, Address, Pin Code, Class. Total, average and grade. Display the following menu for atleast 5 students (use functions): - o Create. To accept data of 5 student o Report card to display report card of one student o Name list to display data sorted on name o Merit List. To generate merit list CONSTRUCTOR 11. Write a program to accept the number and compute the factorial. 12. Write a program to generate Tribonacci series. POINTERS 13. Write a program to swap 2 given numbers. 14. Write a program to create, and display the elements of an integer array.
  • 4. 15. Declare a structure struct telephone { char tno[9]; char name[10]; }; Write the program to do the following : • Create an array with 5 elements of telephone type and initialize it with telephone nos. and names of your 5 friends. • Create a pointer to telephone array • Display the telephone details of your 5 friends using pointer. 16. Try the following program illustrating the use of this pointer class one { char name[10]; public: one (char * s) // constructor function { strcpy(name, s); } one compare(one s) { if (strcmp(name,s.name) ==0) return this; else return s; } void display( ) { cout <<”current calling object is : “<< name; cout << “nPress any key to continue……”; getch( ); } }; int main( ) { one obj1(“Obj1”), obj2(“Obj2”), obj3(“Obj1”); obj2.display( ); obj3.display( ); one *p=obj1.compare(obj2); p->display(); p=obj1.compare(obj3); p->display();
  • 5. } INHERITANCE 17 Consider the classes: class person{ private: char name[20]; protected: int age; public: void readdata(); void displdata(); }; class employee:public person { char department[20]; protected: float salary; public: void read(); void write(); float retsal { return salary;} int retage(){ return age;} int retdep(char *d) { if (strcmp(d,department) == 0) return 1; else return 0;} }; Complete the above classes and write main function having 5 employees and display a menu: 1. Create 2. Search on the basis of age 3. Search on the basis of department 4. Search on the basis of salary FILE HANDLING 17. Write a program to accept a text file name and display: -  Number of characters
  • 6.  Frequency Table o No of Uppercase character o No of Vowels o No of Digits o No of Words  Number of lines 18. Write a program to accept the text file name and display the following menu: -  Find and replace a character  Replace lowercase character with uppercase character 19. Write a program to accept a source file and target file and display the following menu: -  Copy contents source to target  Change case of source to target  Replace many spaces to one space  Change contents like “AASTHA” to “aaSTHa” 20. Consider the following class class STUD { int Rno; char Name[20]; public: void Enter(){cin>>Rno;gets(Name);} void Display(){cout<<Rno<<Name<<endl;} }; Write the program which displays the following menu and allows following file operations assuming the binary file is containing the objects of the above mentioned class: - • Create • Add • Delete (Using Two files) (Use remove( ) and rename( ) functions) • Display NOTE : Define separate functions for above mentioned operations 21. Write a program to create an employee class having the following data members: - Private Emp_no Integer Name Character Address Character
  • 7. Pin Code Character Basic Float HRA Float DA Float PF Float Public Readata() To accept the data Retempno() Function to return employee no. Showdata() To show the data And display the following menu: -  Create  Add  Modify (Using one file)  Search  Display NOTE : Define separate functions for above mentioned operations STACKS and QUEUE 22.Write a program to perform various stack operations like push(), pop(), display() on a STATIC stack. 23.Write a program to perform various queue operations like insert(), delete(), display() on a circular queue array. 24.Write a program to perform various stack operations like push(), pop(), display() on a linked stack having following node structure: - Roll_n Integer o Age Integer 25.Write a program to perform various queue operations like insert(), delete(), display() on a linked queue having 1 integer and 1 floating type data. Struct Node { int x; float y; Node *link; }; 26.Write a program to perform reverse a line-using stack having string to store each word.
  • 8. STRUCTURE QUERY LANGUAGE 27.Create employee tables having the following: - Empno Number (4) Deptno Number (2) Empname Character (20) Job Character (10) Manager Number (4) Hire Date Date Salary Number (7,2) Commission Number (7,2) Query Statements based on that: -  Create a table  Insert 5 records  Display the names of employee whose name starts with “P” or “R”.  Display information of employee getting between Rs. 2000 and 8000.  Display information on the basis of dept_no. 28. Write the outputs of SQL commands given in (h) with the help of the table shown. EmpNo Name Job Mgr Hiredate Sal Deptno Integer Character Character Float Date Float Integer  To select all the information of employee of Dept number 20  Find all employees who are either Clerks or who are earning between 1000 and 2000.  To list names of all employees in ascending order of their salary.  To display employee’s name, Salary, Deptno for only managers.  To count the number of employees with salary <3000.  To insert a new row in the Employee table with the following data: 11, “MILLER”, “Manager”, 7698, {25/02/98}, 4300, 20.  Give the output of the following SQL statements: - o Select COUNT(*) from EMPLOYEE. o Select MIN(Salary) from EMPLOYEE where deptno=20 o Select SUM(Salary) from EMPLOYEE where department=”Clerk”. o Select AVG(Salary) from EMPLOYEE.  Consider a table Department having fields as Deptno Deptname Integer Character
  • 9. o Display name of employees along with their department having deptno as 10 or 20. o Display total salary of each department. o Display total salary of each department whose employee name starts with N or P. o Display total salary of each department whose total salary > 20000. 29.Write the SQL command for (a) to (f) on the basis of the table given below (DIRECTORY). DIRECTORY No. Fname Lname Phone Address Integer Character Character Float Character  To select all the information of employee of Rohini area.  Update the database set the phone no. as 7047645 where phone number is 7057456.  To create a view called Dir with the following fields-> Fname, Phone and Address.  To display the data for Arpit, Rahul and Kisan.  To delete the rows where the address is Rohini.  To delete the table physically.