Answer Sheet Template: Part - A (One Exercise) Ans. 1: C Code For Exercise 1 - Symbol Table Creation (35 Marks)
Answer Sheet Template: Part - A (One Exercise) Ans. 1: C Code For Exercise 1 - Symbol Table Creation (35 Marks)
#include<conio.h>
#include<stdlib.h>
#define SIZE 5;
void main()
clrscr();
void insert();
void delete();
void display();
int a;
cout<<"menu\n";
cout<<"1. Insert\n";
cout<"2. Delete\n";
cout<<"3. Dispaly\n";
cout<<"4. Exit\n";
cin>>a;
switch(a)
case 1: insert();
break;
case 2: delete();
break;
case 3: display();
break;
case 4: exit(0);
default:
void insert()
int a;
cout<<"array is full"';
else
cin>>a;
arr[rear]=a;
rear++;
void delete()
int a;
if(front==rear)
cout<<"Array is empty";
else
a=arr[front];
front++;
}
}
void display()
int a, tmp=front;
if(front==rear)
else
for(a=tmp;a<rear;a++)
cout<<arr[a]<<" ";
1. What is assembler?
An assembler is a type of computer program that interprets software programs written in
assembly language into machine language, code and instructions that can be executed by a
computer. An assembler enables software and application developers to access, operate and
manage a computer's hardware architecture and components. An assembler is sometimes
referred to as the compiler of assembly language. It also provides the services of an
interpreter
2. What is CISC machine?
CISC was developed to make compiler development easier and simpler. The full form of CISC
is Complex Instruction Set Computer. They are chips that are easy to program that makes
efficient use of memory. CISC eliminates the need for generating machine instructions to the
processor. For example, instead of having to make a compiler, write lengthy machine
instructions to calculate a square-root distance, a CISC processor offers a built-in ability to do
this. Many of the early computing machines were programmed in assembly language.
Computer memory was slow and expensive. CISC was commonly implemented in such large
computers, such as the PDP-11 and the DEC system.
3. What is the use of Flag register in microprocessor?
The Flag or Status register is a 16-bit register which contains 9 flags, and the remaining 7 bits
are idle in this register. These flags tell about the status of the processor after any arithmetic
or logical operation. IF the flag value is 1, the flag is set, and if it is 0, it is said to be reset.
4. What is loader?
A loader is a major component of an operating system that ensures all necessary programs
and libraries are loaded, which is essential during the startup phase of running a program. It
places the libraries and programs into the main memory in order to prepare them for
execution. Loading involves reading the contents of the executable file that contains the
instructions of the program and then doing other preparatory tasks that are required in
order to prepare the executable for running, all of which takes anywhere from a few seconds
to minutes depending on the size of the program that needs to run.
5. What is a linker?
In computer science, a linker is a computer program that takes one or more object files
generated by a compiler and combines them into one, executable program. Computer
programs are usually made up of multiple modules that span separate object files, each
being a compiled computer program. The program as a whole refers to these separately
compiled object files using symbols. The linker combines these separate files into a single,
unified program, resolving the symbolic references as it goes along.
Dynamic linking is a similar process available on many operating systems, which postpones
the resolution of some symbols until the program is executed. When the program is run,
these dynamic link libraries are loaded, as well. Dynamic linking does not require a linker.