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

Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)lokesh meena
 
Computer project final for class 12 Students
Computer project final for class 12 StudentsComputer project final for class 12 Students
Computer project final for class 12 StudentsShahban Ali
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12OmRanjan2
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingHarsh Kumar
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILEAnushka Rai
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12RithuJ
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementRemaDeosiSundi
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul PatelMitul Patel
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdfHarshitSachdeva17
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Self-employed
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Pythonvikram mahendra
 
Operator overloading
Operator overloadingOperator overloading
Operator overloadingBurhan Ahmed
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C ProgrammingShuvongkor Barman
 
Isc computer project final upload last
Isc computer project final upload lastIsc computer project final upload last
Isc computer project final upload lastArunav Ray
 
Object Oriented Programming Using C++ Practical File
Object Oriented Programming Using C++ Practical FileObject Oriented Programming Using C++ Practical File
Object Oriented Programming Using C++ Practical FileHarjinder Singh
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THSHAJUS5
 
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
 

Tendances (20)

Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)Computer science Project for class 11th and 12th(library management system)
Computer science Project for class 11th and 12th(library management system)
 
Computer project final for class 12 Students
Computer project final for class 12 StudentsComputer project final for class 12 Students
Computer project final for class 12 Students
 
Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12Computer science project on Online Banking System class 12
Computer science project on Online Banking System class 12
 
Computer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market BillingComputer science class 12 project on Super Market Billing
Computer science class 12 project on Super Market Billing
 
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILECOMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
 
Library Management Project (computer science) class 12
Library Management Project (computer science) class 12Library Management Project (computer science) class 12
Library Management Project (computer science) class 12
 
Computer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school managementComputer Project for class 12 CBSE on school management
Computer Project for class 12 CBSE on school management
 
Report Card making BY Mitul Patel
Report Card making BY Mitul PatelReport Card making BY Mitul Patel
Report Card making BY Mitul Patel
 
Computer science project.pdf
Computer science project.pdfComputer science project.pdf
Computer science project.pdf
 
Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12Computer Science Investigatory Project Class 12
Computer Science Investigatory Project Class 12
 
BOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in PythonBOOK SHOP SYSTEM Project in Python
BOOK SHOP SYSTEM Project in Python
 
Operator overloading
Operator overloadingOperator overloading
Operator overloading
 
Python revision tour i
Python revision tour iPython revision tour i
Python revision tour i
 
Presentation on Function in C Programming
Presentation on Function in C ProgrammingPresentation on Function in C Programming
Presentation on Function in C Programming
 
Isc computer project final upload last
Isc computer project final upload lastIsc computer project final upload last
Isc computer project final upload last
 
Object Oriented Programming Using C++ Practical File
Object Oriented Programming Using C++ Practical FileObject Oriented Programming Using C++ Practical File
Object Oriented Programming Using C++ Practical File
 
Chapter 02 functions -class xii
Chapter 02   functions -class xiiChapter 02   functions -class xii
Chapter 02 functions -class xii
 
Strings
StringsStrings
Strings
 
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12THBANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
BANK MANAGEMENT INVESTIGATORY PROJECT CLASS 12TH
 
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
 

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
 
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 (13)

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
 
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
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02wingsrai
 
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
 
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
 
Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02Abapprogrammingoverview 090715081305-phpapp02
Abapprogrammingoverview 090715081305-phpapp02
 
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
 
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

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...Pooja Nehwal
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104misteraugie
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docxPoojaSen20
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room servicediscovermytutordmt
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...Sapna Thakur
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingTechSoup
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfchloefrazer622
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionSafetyChain Software
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...fonyou31
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...anjaliyadav012327
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactPECB
 

Dernier (20)

Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...Russian Call Girls in Andheri Airport Mumbai WhatsApp  9167673311 💞 Full Nigh...
Russian Call Girls in Andheri Airport Mumbai WhatsApp 9167673311 💞 Full Nigh...
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104Nutritional Needs Presentation - HLTH 104
Nutritional Needs Presentation - HLTH 104
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
mini mental status format.docx
mini    mental       status     format.docxmini    mental       status     format.docx
mini mental status format.docx
 
9548086042 for call girls in Indira Nagar with room service
9548086042  for call girls in Indira Nagar  with room service9548086042  for call girls in Indira Nagar  with room service
9548086042 for call girls in Indira Nagar with room service
 
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
BAG TECHNIQUE Bag technique-a tool making use of public health bag through wh...
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Mattingly "AI & Prompt Design: The Basics of Prompt Design"
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
Grant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy ConsultingGrant Readiness 101 TechSoup and Remy Consulting
Grant Readiness 101 TechSoup and Remy Consulting
 
Disha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdfDisha NEET Physics Guide for classes 11 and 12.pdf
Disha NEET Physics Guide for classes 11 and 12.pdf
 
Mastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory InspectionMastering the Unannounced Regulatory Inspection
Mastering the Unannounced Regulatory Inspection
 
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
 
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
JAPAN: ORGANISATION OF PMDA, PHARMACEUTICAL LAWS & REGULATIONS, TYPES OF REGI...
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Beyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global ImpactBeyond the EU: DORA and NIS 2 Directive's Global Impact
Beyond the EU: DORA and NIS 2 Directive's Global Impact
 

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.