0 Up votes0 Down votes

9 views6 pagesSep 20, 2012

© Attribution Non-Commercial (BY-NC)

PDF, TXT or read online from Scribd

Attribution Non-Commercial (BY-NC)

9 views

Attribution Non-Commercial (BY-NC)

- An Interface for Assisting the Design and Production of Pop-up Card En
- Zycus Infotech Aptitude Question Paper
- Data Structure 1
- Lecture2 - Data Structures
- syllabus
- ads lab
- Binary Trees Implementation
- cie-a2-computerscience-practical-znotes.pdf
- SC1
- ton01 IDMaps: Global Internet Host Distance Estimation Service HOPS (Host Proximity Service) “IDMaps” Service) SONAR/HOPS
- data stuctures
- Assignment 5
- SMU MBA0048
- Decision Analysis
- Linked List
- SC1
- tcs1
- Trees
- ALV
- 31340413-c-Questions.pdf

You are on page 1of 6

1)Consider the following structure struct node { int info; struct node *link; }; Suppose ptr is a pointer which is not pointing to the first or the last node. Then if we are going to delete a node after ptr, then the code will be a) ptr=ptr->link; b) ptr->link=ptr; c) ptr->link=ptr->link->link; d) ptr=ptr->link->link;

2) Consider the following structure struct node { int info; struct node *link; }; Suppose start is a pointer pointing to the first node of the linked list. s1 and ptr are the two pointers (they are not pointing to the first or last node). Then if we are going to execute the following code, i) start->link=s1; ii) s1->link=ptr; iii) ptr->link=start; then the list is a) It is having only 3 nodes with start, s1, ptr in the list, having start as the first node b) It is a circular linked list c) It is a doubly linked list d) None of the above

3) In a queue, if rear=front then what will be the queue a) Queue is empty b) Queue is full c) Queue has only one element d) None of the above 4) In a queue, if rear=0, front=0 then what will be the queue a) Queue is empty b) Queue is full c) Queue has only one element d) None of the above 5) a) b) c) d) In a queue, if rear=0, front=1 then what will be the queue Queue is empty Queue is full Queue has only one element Queue is circular

6) In a queue,if rear=-1,front=-1 then what will be the queue a) Queue is empty b) Queue is full c) Queue has only one element d) None of the above 7) In a queue, if rear=max-1, front=0 then what will be the queue a) Queue is empty b) Queue is full c) Queue has only one element d) None of the above 8) The postfix expression is ab+c*d/e-.The values of a, b, c, d, e are 2, 4, 5, 2, 1 respectively. Then the output is a) b) c) d) 14 11 20 15

9) The infix expression is a+b*(c-d)/(e+f)*h then my postfix expression is a) ab+cd-*ef+h*/ b) abcd-ef+*/h* c) abcd-*ef+/h*+ d) abcdef+-*/h*+ 10) In the stack, if top=0 then the stack is a) Stack is empty b) Stack is full c) Stack has only one element d) None of the above

11) Consider the structure struct node { int info; struct node *left; struct node *right; }; We have 10 elements in the list. If the following executes what will be the output? for(ptr=start; ptr; ptr=ptr->right) { if(ptr->data%2==0) printf("%d", ptr->data); } a) Only even numbers are printed b) Only odd numbers are printed c) Compiler error d) Only garbage values 12) struct node { int data; struct node *left,*right; };

Suppose nd is a node which is not in the beginning and also not in the end. How will you delete a node after nd? a) nd->right=nd->right->left;nd->right->left=nd->left->right; b) nd->right=nd->right->right;nd->right->left=nd; c) nd->right=nd->right->left;nd->right->left=nd->right; d) nd->right=nd->left->right;nd->left->right=nd;

13)

Suppose nd is a node which is not in the beginning and also not in the end. How will you delete a node before nd? a) nd->left=nd->right->left;nd->right->left=nd->left->right; b) nd->left=nd->right->right;nd->left->right=nd->right; c) nd->left=nd->left->left;nd->left->right=nd; d) nd->left=nd->left->right;nd->left->right=nd; 14) struct node { int data; struct node *left,*right; };

Suppose ptr is a node which is not in the beginning and also not in the end. How will you delete a node ptr? a) ptr->left->right=ptr->right;ptr->right->left=ptr->left;free(ptr); b) ptr->left->right=ptr->right->right;ptr->left->right=ptr->right;free(ptr); c) ptr->left->right=ptr->left->left;ptr->left->right=ptr;free(ptr); d) ptr->left->right=ptr->left;ptr->left->right=ptr->left;free(ptr);

15)

Suppose ptr is a node which is not in the beginning and also not in the end. nd is the new node. Here is the coding: i) ptr->right->left=nd; ii) nd->left=ptr; iii) ptr->right=nd; iv) nd->right=ptr->right; Then what sequence does it follows for inserting nd after ptr? a) i,ii,iii,iv b) ii,iv,i,iii c)iv,iii,ii,i d) ii,iii,i,iv 16) In the Given Infix expression which is the root node for your expression tree (A+B)-(C*D)+G/H*I a) + b) c) * d) /

17) Consider a binary search tree insert(10,root); insert(25,root); insert(5,root); insert(8,root); insert(13,root); insert(45,root); insert(70,root); insert(32,root); delete(13,root);

insert(66,root); insert(13,root); insert(36,root); What will be the preorder traversal is a) 5,8,10,13,25,32,36,45,66,70 b) 10,5,8,25,13,45,32,36,70,66 c) 10,8,5,13,32,45,36,66,32,70 d) 8,5,32,36,10,66,45,70,25,13

19) The preorder traversal is 5, 3, 66, 30, 77, 70 .What will be the root node a) 5 b) 66 c) 70 d) 30 20) Which one of the following is true for the binary tree i) root is greater than the left sub tree and lesser than the right sub tree ii) root is lesser than the left sub tree and greater than the right sub tree a) only i b) only ii c) both i and ii d) Neither i nor ii

- An Interface for Assisting the Design and Production of Pop-up Card EnUploaded byjoin
- Zycus Infotech Aptitude Question PaperUploaded byJames Ronaldo
- Data Structure 1Uploaded bymagisraj
- Lecture2 - Data StructuresUploaded byMrZaggy
- syllabusUploaded byjojo
- ads labUploaded byrakesh reddy
- Binary Trees ImplementationUploaded byAyush Karn
- cie-a2-computerscience-practical-znotes.pdfUploaded byAuret
- SC1Uploaded bykrishna_mf01
- ton01 IDMaps: Global Internet Host Distance Estimation Service HOPS (Host Proximity Service) “IDMaps” Service) SONAR/HOPSUploaded byEco Economic Heartbeat
- data stucturesUploaded byAnonymous 2k8565Ew
- Assignment 5Uploaded byWaleed Khalid
- SMU MBA0048Uploaded byRahul Gusain
- Decision AnalysisUploaded byRakesh Mg
- Linked ListUploaded byAshish Indolia
- SC1Uploaded bykrishna_mf01
- tcs1Uploaded bydecentdivya16
- TreesUploaded bybayentapas
- ALVUploaded byYan Marco Soldevilla Luque
- 31340413-c-Questions.pdfUploaded byMiguel Bruno
- Decision ModellingUploaded byStella-Jebas
- 1-slideUploaded byfsdgfghsdg
- Monitor de Temperatura Ba2103Uploaded byenriqueuno
- 2383117 Construction PlanningUploaded byHajarath Prasad Abburu
- Rr410110 Data Structures Through cUploaded bySrinivasa Rao G
- QuestionsUploaded byAbhishek Jha
- file mgmtUploaded byRoshan Nandan
- General Information Regarding LeetUploaded byRitish Arora
- Ejemplo 1Uploaded byRogger Valverde
- Dsa Ques Jan 2019Uploaded bykamalshrish

- Intro Class 3Uploaded bySijo VM
- General Overview of Function Module Pricing_complete - ERP SD - SCN WikiUploaded bywiwins
- UNIX Question Bank - final.pdfUploaded byAjay Kumar
- Comparing Strings if CO (SAP Library - ABAP Programming (BC-ABA))Uploaded byhjheredias
- Spark on Hadoop vs MPI OpenMP on BeowulfUploaded byravigobi
- Abinitio Online Training Tutorial Course Program | Abinitio Online Training | Online Abinitio Training | Ab Initio Online Training | Ab initio training by VperactoUploaded byVperacto Online Training Center
- Kannur University S5 & S6 SYLLABUSUploaded byaj3120
- Week5-DBMS.pdfUploaded byFatima Irfan
- How to enter and query Arabic characters into or from database via forms applicationUploaded bySHAHID FAROOQ
- IBM Software GroupUploaded bymnreddy
- SQL Help _ SQL Operators.pdfUploaded bydanhammett
- microstation_basicUploaded byGemski Portento
- Depth First SearchUploaded byLal Raj
- Report on Chat ServerUploaded byJai Kishore Jangir
- Communications of ACM March 2016Uploaded bymaria_croitor
- Awk LispUploaded byeliphant0723
- CodeVisionAVR User ManualUploaded byAmilcarafab
- Printing Invoices-Smart FormsUploaded bysonavaness
- Vin u Full ReportUploaded byKingcobra Rajanagan
- 80286Uploaded byArannya Monzur
- History of PrologUploaded bycuber18
- cpphtp8LM_02.pdfUploaded byhii
- How to Interview an Oracle DeveloperUploaded byexbis
- PsudocodeUploaded byJimmy Lie
- Theory of EverythingUploaded byFrancisJacob
- 53235352 Digital Diary Project ReportUploaded byguruannamalai
- solution manual real time system bt jane w s liu solution manual .pdfUploaded byneerajdhanraj
- SQR User's GuideUploaded byvinitpatil85
- 02 StacksUploaded byamitfegade121
- javaUploaded byapi-278583270

## Much more than documents.

Discover everything Scribd has to offer, including books and audiobooks from major publishers.

Cancel anytime.