Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
30 views

Programming in C++ and Data Structures - 5

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Programming in C++ and Data Structures - 5

Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 1

1. Mention any four keywords in C++.

auto, break, case, int


2. What is meant by order list?
The structure of an ordered list is a collection of items where each item holds a
relative position that is based upon some underlying characteristic of the item. Eg:
Stack, Queue, Linked List.
3. Define prefix notation, infix notation, postfix notation 
Infix notation: X + Y Operators are written in-between their operands.
Postfix notation: X Y + Operators are written after their operands.
Prefix notation: + X Y Operators are written before their operands. 
4. Write the postfix and prefix expression ((A+B)*(C-D))/(P-R)
AB+CD-*PR-/
5. What is the push in stack?
Inserting an element into a stack is called push
6. List out the use of singly linked list 
Dynamic memory allocation: We use linked list of free blocks.
Maintaining directory of names
Performing arithmetic operations on long integers
7. State the application of queue
1. When a resource is shared among multiple consumers. Examples include CPU
scheduling, Disk Scheduling.
2. When data is transferred asynchronously (data not necessarily received at same
rate as sent between two processes. Examples include IO Buffers, pipes, file IO, etc.

You might also like