Preview

stress

Satisfactory Essays
Open Document
Open Document
740 Words
Grammar
Grammar
Plagiarism
Plagiarism
Writing
Writing
Score
Score
stress
ANNA UNIVERSITY: CHENNAI – 600 025
B.E/B.Tech Degree Practical Examinations Oct / Nov – 2012
EC2209 - Data Structures and Object Oriented Programming Lab
B.E Electronics and Communication Engineering
Regulations - 2008
Time: 3 Hours
1

a

Maximum Marks: 100

Write complex class to represent a complex number as an attribute and overload + operator to add two complex numbers as a member function. Test the program with proper inputs from main function.

50

Write a C++ program to sort the following integers using quick sort with 50

b

median-of- three partitioning.
3, 10, 4, 1, 5, 9, 12, 6, 15, 13, 25, 1, 5, 3, 9, 2
2

a

Write a C++ program to count the number of objects created. Use static member 50 to count the number of objects created. Test the program with proper input with main function.
50

b
3

Write a C++ Program to reverse the string using stack.

a

Write a C++ program to sum the two data members in a class using a friend 50 function. Test the program with proper input with main function.

b

Write a C++ program to convert the following infix expression to postfix 50 expression. 2 + 3 * 5 - (6*7) + 9

4

a

50

Implement the following class hierarchy.
Shape

Sphere

Cylinder

Square

The base class contains pure virtual function to calculate the area of the shape.
Implement function in each of the derived classes and test the program with proper inputs from main function. b Write a C++ program that removes all duplicate elements from a doubly linked 50 list. 5

Write a C++ program to create the singly linked list using arrays and do the following 25 operations on a created list. i 20

ii

Display right to left

20

iii

Search for a number

20

iv
6

Display left to right

Number of elements in the list

15

a

Write a C++ program to implement the doubly linked list and count the number of 50 elements which has the same data item.

b

Write a

You May Also Find These Documents Helpful

  • Good Essays

    Exercise 1: Review of array-based lists Create a project using the classes in the DocSharing area labeled “User-defined array list." Compile it, run it, and review the code that is given carefully. This code tests the ArrayList class provided in the lecture.…

    • 714 Words
    • 3 Pages
    Good Essays
  • Good Essays

    Nt1310 Unit 3 Quiz

    • 6337 Words
    • 26 Pages

    /*question number 1*/ Code: int z,x=5,y=-10,a=4,b=2; z = x++ - --y * b / a; What number will z in the sample code above contain? Choice 1 5 Choice 2 6 Choice 3…

    • 6337 Words
    • 26 Pages
    Good Essays
  • Good Essays

    ElizabethFlaimFP

    • 1289 Words
    • 7 Pages

    Objective: Devise a program that will allow a user to input a list of family members with their age and state where they live. Once the list is complete, the program will calculate and print the average age of the user’s family and also print the names of any family members that live in Texas. All three items, the input, average, and printing family members from Texas will require the use of repetitive programming statements/loops.…

    • 1289 Words
    • 7 Pages
    Good Essays
  • Satisfactory Essays

    Comp122 Week 2 Homework

    • 301 Words
    • 2 Pages

    4. Write a C++ statement that uses the manipulator 'setfill' to output a line containing 35 asterisk characters.…

    • 301 Words
    • 2 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Week1 Exercises

    • 499 Words
    • 2 Pages

    b) Declare and initialize an int variable temp to 10 and a char variable ch to ‘A’.…

    • 499 Words
    • 2 Pages
    Satisfactory Essays
  • Good Essays

    Doubly Linklist

    • 555 Words
    • 3 Pages

    #include<stdio.h> #include<conio.h> #include<alloc.h> typedef struct dll { int data; struct dll *next; struct dll *prev; }node; //struct dll *head= NULL; node *getnode() { node *temp; temp=(node *)malloc(sizeof(node)); temp->next= NULL; temp->prev=NULL; return temp; } node *creation() { node *temp,*new1,*head; int f=1; char c; do { new1=getnode(); printf("\n\nEnter the data.\n\n"); scanf("%d",&new1->data); if(f==1) { head=new1; temp=head; f=0; } else { temp->next=new1; new1->prev=temp; temp=new1; } printf("\n\nDo you want to continue with creation.\n\n"); c=getche(); }while(c=='y'||c=='Y'); return head; } void display(node *head) { node *temp; temp=head; printf("\n\nThe list is...\n\n"); while(temp!=NULL) { printf("%d\n",temp->data); temp=temp->next; } } node *insertion(node *head) { node *new1,*temp; int c,value; char ch; do { new1=getnode(); printf("\n\nEnter the data to be insered.\n\n"); scanf("%d",&new1->data); printf("\n\nEnter your place of insertion.\n\n"); printf("\n1.Head.\n2.Intermediate.\n3.Tail.\n"); scanf("%d",&c); switch(c) { case 1: temp=head; new1->next=temp; temp->prev=new1; head=new1; break; case 2: temp=head; printf("\n\nEnter the value after which the insertion has to take place.\n\n"); scanf("%d",&value); while(temp->data!=value) { temp=temp->next; } temp->next->prev=new1; new1->next=temp->next; temp->next=new1; new1->prev=temp; break; case 3: temp=head; while(temp->next!=NULL) { temp=temp->next; } temp->next= new1; new1->next=…

    • 555 Words
    • 3 Pages
    Good Essays
  • Satisfactory Essays

    Eee Syllabus Anna University

    • 13228 Words
    • 53 Pages

    ANNA UNIVERSITY CHENNAI: CHENNAI – 600 025 B.E DEGREE PROGRAMME (3 - 8 SEMESTERS) ELECTRICAL AND ELECTRONICS ENGINEERING (Offered in Colleges affiliated to Anna University) CURRICULUM AND SYLLABUS – REGULATIONS – 2004 SEMESTER III (Applicable to the students admitted from the Academic year 2006 – 2007 onwards) |THEORY |L |T |P |M | |1. |MA 1201 |Mathematics – III |3 |1 |0 |100 | |2. |CY 1201 |Environmental Science and Engineering |3 |0 |0 |100…

    • 13228 Words
    • 53 Pages
    Satisfactory Essays
  • Satisfactory Essays

    Bata Annual Report 09

    • 13683 Words
    • 55 Pages

    2 4 6 7 8 9 10 12 16 21 22 23 24 24 25…

    • 13683 Words
    • 55 Pages
    Satisfactory Essays
  • Good Essays

    iii 1 3 3 4 5 6 7 8 10 11 11 12 13 13 14 15 15 17 18 20 20 20 21 21 25…

    • 16975 Words
    • 68 Pages
    Good Essays
  • Powerful Essays

    Stress

    • 1082 Words
    • 5 Pages

    We generally use the word "stress" when we feel that everything seems to have become too much - we are overloaded and wonder whether we really can cope with the pressures placed upon us. Anything that poses a challenge or a threat to our well-being is a stress. Some stresses get you going and they are good for you - without any stress at all many say our lives would be boring and would probably feel pointless. However, when the stresses undermine both our mental and physical health they are bad. In this text we shall be focusing on stress that is bad for you.…

    • 1082 Words
    • 5 Pages
    Powerful Essays
  • Satisfactory Essays

    WRITE A PROGRAM WHICH ACCEPTS FIVE NUMBERS IN AN ARRAY AND FIND THE GIVEN NUMBER.…

    • 529 Words
    • 3 Pages
    Satisfactory Essays
  • Good Essays

    C++ Programs

    • 716 Words
    • 3 Pages

    1. Write a program program in C++ to find the square of the numbers from 1 to 10 using :…

    • 716 Words
    • 3 Pages
    Good Essays
  • Good Essays

    | Classes & ObjectsSpecifying a class, creating class objects, accessing class members, access specifiers: public, private, and protected, classes, objects and memory, static members, the const keyword and classes, the static objects, empty classes, nested classes, local classes, abstract classesList of programs: 1. Write a program in C++ to display your name, Branch, Year on too the computer screen without using classes and object. All information should be displayed in the separate line. 2. Write a menu driven program in C++ to perform all basic arithmetic operation addition, subtraction, multiplication, and division of two given values. Program receives two values and required operation to…

    • 3383 Words
    • 14 Pages
    Good Essays
  • Satisfactory Essays

    D | |1. C |2. D |1. D |1. A |50.…

    • 2991 Words
    • 12 Pages
    Satisfactory Essays
  • Good Essays

    computer science record

    • 6312 Words
    • 26 Pages

    Step 1: Using the for loop i Step 2:Print the linked list #include #include #include struct node { int item; struct node *link; }; typedef struct node NODE; NODE *head; NODE *getnode(); void readnode(NODE *newnode); void createlist(); void insertfirst(); void deletefirst(); void viewlist(); void main() { int ch; clrscr(); printf("\n\n\t\t SINGLY LINKEDLIST\n"); printf("\t\t *****************\n"); do { printf("\n 1.CREATE LIST"); printf("\n 2.INSERT FIRST"); printf("\n 3.DELETE FIRST"); printf("\n…

    • 6312 Words
    • 26 Pages
    Good Essays