Gaonkar Chapter 10
1. Packed BCD and unpacked BCD
2. BCD to binary,binary to BCD
3. Binary to ASCII and ASCII to bianry.
4. BCD addition and BCD subraction.
5. DAA simulation.
Gaonkar Chapter 10
1. Packed BCD and unpacked BCD
2. BCD to binary,binary to BCD
3. Binary to ASCII and ASCII to bianry.
4. BCD addition and BCD subraction.
5. DAA simulation.
Gaonkar Chapter 9
1. What is stack?
2. What is subroutine?
3. How PUSH and POP instructions are executed?show the steps.
4. Timing diagram of PUSH, POP.
5. What is subroutine?
6. How CALL and RET instructions are executed?show the steps.
7. Timing diagram of CALL, RET.
8. How parameters are passed in subroutine?
9. Restart insrucions.
10. Conditional call.
11. Nesting of subroutine.
12. comparison of instruction CALL,PUSH,POP,RET.
Gaonkar Chapter 8
1. what is time delay?
2. Delay using single register
3. Delay usng register pair
4. Delay using loop within loop
5. Design a 1 second delay
Gaonkar Chapter 7
1. Continuous loop, Conditional loop
2. Counter and indexing
3. 16 bit operaion of MP
4. Block transfer
Gaonkar Chapter 6
1. NOP operation uses
2. Addressing mode of instruction
3. Conditional jump, Unconditional jump
4. Static debugging, Dynamic debugging
Gaonkar Chapter 5
1. IN and OUT instruction timing diagaram
2. Chip selection
Gaonkar Chapter 4
1. Multiplexed Address Bus
2. Use of ALE
3. Control and status signal
4. How clock is generated in MP?
5. Demultiplexing the AD bus diagram
6. Timing diagram of differen machine cycle
7. IR regesiter function
8. Register arrays
9. Memory interfacing
10. Absolute decoding, Partial decoding
Gaonkar Chapter 3
1. Instruction cycle
2. Fetch,decode,execute cycle
3. Machine cycle
4. T-states
5. Data bus, Address Bus, Control Bus
6. Unidirectional bus, Bidirectional bus
7. Memory map and address
8. Memory mapped i/o,i/o mapped i/o or isolated i/o ( comparison)
9. Buffer, tristate buffer, bidirectional buffer
10. Priority encoder
Gaonkar Chapter 2
1. Different registers
2. Flag registers
3. PC and SP
4. Word size of microprocessor
5. Opcode format
6. One byte ,two byte, three byte instruction
7. How does microprocessor differentiate data and instruction code?
8085 Microprocessor sample question set
Gaonkar Chapter 1
1. How does the microprocessor works?
2. Instruction set.
3. Microcontroller defination,difference with microprocessor.
4. Monitor program
18. WAP to display Fibonacci series
(i)using recursion,
(ii) using iteration
19. WAP to calculate Factorial of a number (i)using recursion, (ii) using iteration
20. WAP to calculate GCD of two numbers (i) with recursion (ii) without recursion.
17. Given two ordered arrays of integers, write a program to merge the two-arrays to get an ordered array.
16. Write a menu driven program to perform following operations on strings:
a) Show address of each character in string
b) Concatenate two strings without using strcat function.
c) Concatenate two strings using strcat function.
d) Compare two strings
e) Calculate length of the string (use pointers)
f) Convert all lowercase characters to uppercase
g) Convert all uppercase characters to lowercase
h) Calculate number of vowels
i) Reverse the string
15. Write a program to find sum of n elements entered by the user. To write this program, allocate memory dynamically using malloc() / calloc() functions or new operator.
13. Write a program in which a function is passed address of two variables and then alter its contents.
14. Write a program which takes the radius of a circle as input from the user, passes it to another function that computes the area and the circumference of the circle and displays the value of area and circumference from the main() function.
11. WAP that prints a table indicating the number of occurrences of each alphabet in the text entered as command line arguments.
how to execute from command line
c++ code :
12. Write a program that swaps two numbers using pointers.
10. WAP to perform following actions on an array entered by the user:
i.Print the even-valued elements
ii.Print the odd-valued elements
iii.Calculate and print the sum and average of the elements of array
iv.Print the maximum and minimum element of array
v.Remove the duplicates from the array
vi.Print the array in reverse order
The program should present a menu to the user and ask for one of the options. The menu should also include options to re-enter array and to quit the program.
CMS-A-CC-5-11-P: Relational Database Management System
Core Course- 11, Practical, Credit:02, Contact hours: 40 hours.
RDBMS Lab using My SQL & PHP
11. WAP to calculate factorial and to compute the factors of a given no. (i)using recursion, (ii) using iteration
#include<iostream>
using namespace std;
class cl
{
private:
int no,fl;
public:
void input()
{
fl=1;
cout<<"\nEnter the no: ";
cin>>no;
}
void factorial()
{
if(no==0)
{
cout<<"\n"<<no<<"!= "<<1;
}
else
{
for(int i=no;i>=1;i--)
{
fl=fl*i;
}
cout<<"\n"<<no<<"!= "<<fl;
}
}
int factorial(int n)
{
if(n > 1)
return n * factorial(n - 1);
else
return 1;
}
void factor()
{
cout<<"\nFactors of "<<no<<"= ";
if(no==1)
{
cout<<1;
}
for(int i=2;i<=no;i++)
{
if(no % i ==0)
{
cout<<" "<<i;
}
}
}
void factor(int n,int i)
{
if(n==1)
cout<<"1";
else
{
if(i <= n)
{
if(n%i == 0)
{
cout << i << " ";
}
factor(n,i+1);
}
}
}
};
int main()
{
cl ob;
int ch,n,x;
do
{
cout<<"\n1.FACTORIAL using Iteration \n2.FACTORIAL using Recursion \n3.Compute FACTORS using Iteration \n4.Compute FACTORS using Recursion \n5.Exit";
cout<<"\nEnter ur Choice: ";
cin>>ch;
switch(ch)
{
case 1:
ob.input();
ob.factorial();
break;
case 2:
cout<<"\nEnter the no: ";
cin>>n;
x=ob.factorial(n);
cout<<"\n"<<n<<"!= "<<x;
break;
case 3:
ob.input();
ob.factor();
break;
case 4:
cout<<"\nEnter the no: ";
cin>>n;
cout<<"\nFactors of "<<n<<"= ";
ob.factor(n,2);
break;
case 5:
cout<<"\nEXIT";
break;
default:
cout<<"\nSorry! Invalid Choice";
}
}
while(ch!=5);
return 0;
}
CMSACOR05P: Data Structures Lab
10. WAP to scan a polynomial using linked list and add two polynomial.
PROGRAME : WAP to scan a
polynomial using linked list and add two polynomial…
PROGRAME CODE
#include<stdio.h>
#include<iostream>
using namespace std;
class node{
public:
int
degree;
int
data;
node*
link1;
node(){
degree=0;
data=0;
link1=NULL;
}
};
class poly{
public:
node*
head;
poly(){
head=NULL;
}
int
check(int k){
node*
ptr=head;
while(ptr!=NULL){
if(ptr->degree==k)
return
1;
ptr=ptr->link1;
}
return
0;
}
void
append(node* n){
if(head==NULL)
head=n;
else{
if(check(n->degree))
cout<<"THE
DGREE IS ALREADY EXIST TRY WITH ANOTHER ....."<<endl;
else{
node*
ptr=head;
while(ptr!=NULL){
if(ptr->link1==NULL){
ptr->link1=n;
break;
}
ptr=ptr->link1;
}
}
}
}
poly
operator +(poly ob1){
node*
ptr=head;
node*
ptr1=head;
node*
ptr3=NULL;
node*
ptr4=head;
node*
ptr5=head;
node*
ptr6=head;
cout<<"ADDITION
SUCCESSFULL "<<endl;
while(ptr1->link1!=NULL)
ptr1=ptr1->link1;
ptr1->link1=ob1.head;
for(ptr=head;ptr!=NULL;ptr=ptr->link1){
ptr3=ptr->link1;
while(ptr3!=NULL){
if(ptr3->degree==ptr->degree){
ptr->data=ptr->data+ptr3->data;
}
ptr3=ptr3->link1;
}
}
while(ptr4!=NULL){
ptr6=ptr4;
ptr5=ptr4->link1;
while(ptr5!=NULL){
if(ptr4->degree==ptr5->degree)
ptr6->link1=ptr5->link1;
ptr6=ptr5;
ptr5=ptr5->link1;
}
ptr4=ptr4->link1;
}
}
void
display(){
if(head==NULL)
cout<<".........EMPTY............"<<endl;
else{
node*
ptr=head;
while(ptr!=NULL){
cout<<"("<<ptr->data<<"
x^"<<ptr->degree<<")";
if(ptr->link1!=NULL)
cout<<"
+ ";
ptr=ptr->link1;
}
cout<<"=
0 ";
}
}
};
int main(){
int
opt=0;
poly
ob;
poly
ob1;
do{
cout<<"\nPRESS
0 TO EXIT...."<<endl;
cout<<"PRESS
1 TO APPEND NODE FOR 1st POLYNOMIAL..........."<<endl;
cout<<"PRESS
2 TO APPEND NODE FOR 2nd POLYNOMIAL..........."<<endl;
cout<<"PRESS
3 TO DISPLAY 1st POLYNOMIAL......"<<endl;
cout<<"PRESS
4 TO DISPLAY 2nd POLYNOMIAL......"<<endl;
cout<<"PRESS
5 TO ADD TWO POLYNOMIALS........"<<endl;
cout<<"PRESS
6 TO DISPLAY THE RESULT........"<<endl;
cin>>opt;
node
*n=new node();
switch(opt){
case
0:
break;
case
1:
cout<<"ENTER
THE DEGREE....."<<endl;
cin>>n->degree;
cout<<"ENTER
THE DATA......"<<endl;
cin>>n->data;
ob.append(n);
break;
case
2:
cout<<"ENTER
THE DEGREE....."<<endl;
cin>>n->degree;
cout<<"ENTER
THE DATA......"<<endl;
cin>>n->data;
ob1.append(n);
break;
case
3:
ob.display();
break;
case
4:
ob1.display();
break;
case
5:
ob+ob1;
break;
case
6:
ob.display();
break;
default:
cout<<".........ERROR........"<<endl;
break;
}
}while(opt!=0);
return
0;
}
CMSACOR05P: Data Structures Lab
8. Perform Queues operations using Circular Array implementation. Use Templates.
CMSACOR05P: Data Structures Lab
9. Create and perform different operations on Double-ended Queues using Linked List implementation.
PROGRAME CODE
#include<stdio.h>
#include<iostream>
using namespace std;
class node{
public:
int key;
int data;
node* link1;
node(){
key=0;
data=0;
link1=NULL;
}
};
class de_queue{
public:
node* head;
de_queue(){
head=NULL;
}
int check(int n){
node* ptr=head;
while(ptr!=NULL){
if(ptr->key==n)
return 1;
ptr=ptr->link1;
}
return 0;
}
void queue(node* n){
if(head==NULL)
head=n;
else{
if(check(n->key))
cout<<"THIS
KEY IS ALREADY EXIST...TRY WITH ANOTHER KEY .."<<endl;
else{
node* ptr=head;
while(ptr!=NULL){
if(ptr->link1==NULL){
ptr->link1=n;
break;
}
ptr=ptr->link1;
}
}
}
}
void stenqueue(node* n){
if(head==NULL)
head=n;
else{
if(check(n->key))
cout<<"THIS
KEY IS ALREADY EXIST...TRY WITH ANOTHER KEY .."<<endl;
else{
n->link1=head;
head=n;
cout<<"INSERT
A DATA SUCCESSFULLY FROM FRONT...."<<endl;
}
}
}
void lastenqueu(node* n){
if(head==NULL)
head=n;
else{
if(check(n->key))
cout<<"THIS
KEY IS ALREADY EXIST...TRY WITH ANOTHER KEY .."<<endl;
else{
node* ptr=head;
while(ptr!=NULL){
if(ptr->link1==NULL){
ptr->link1=n;
break;
}
ptr=ptr->link1;
}
cout<<"INSERT
DATA SUCCESSFULLY FROM REAR ...."<<endl;
}
}
}
void stdqueue(){
if(head==NULL)
cout<<"THE QUEUE IS
EMPTY ...."<<endl;
else{
head=head->link1;
cout<<"DELETE AN
ELEMENT SUCCESSFULLY FROM FRONT ...."<<endl;
}
}
void lastdqueue(){
if(head==NULL)
cout<<"THE QUEUE IS
EMPTY........."<<endl;
else{
node* ptr=head;
node* ptr1=NULL;
while(ptr->link1!=NULL){
ptr1=ptr;
ptr=ptr->link1;
}
ptr1->link1=NULL;
cout<<"DELETE AN
ELEMENT SUCCESSFULLY FROM REAR..."<<endl;
}
}
void display(){
if(head==NULL)
cout<<"THE QUEUE IS
EMPTY ...."<<endl;
else{
node* ptr=head;
while(ptr!=NULL){
cout<<"("<<ptr->key<<","<<ptr->data<<")->";
ptr=ptr->link1;
}
}
}
};
int main(){
de_queue ob;
int opt=0;
do{
cout<<"\nPRESS 0 TO EXIT
...."<<endl;
cout<<"PRESS 1 TO INSERT DAAT IN QUEUE
....."<<endl;
cout<<"PRESS 2 TO ENQUEUE AT FIRST
...."<<endl;
cout<<"PRESS 3 TO ENQUEUE AT
LAST......"<<endl;
cout<<"PRESS 4 TO DEQUEUE AT
FIRST......"<<endl;
cout<<"PRESS
5 TO DEQUEUE AT LAST......"<<endl;
cout<<"PRESS 6 TO
DISPLAY......"<<endl;
cin>>opt;
node *n=new node();
switch(opt){
case 0:
break;
case 1:
cout<<"ENTER THE KEY
OF THE DATA ->"<<endl;
cin>>n->key;
cout<<"ENTER THE
DATA ->"<<endl;
cin>>n->data;
ob.queue(n);
break;
case 2:
cout<<"ENTER THE KEY
OF THE DATA ->"<<endl;
cin>>n->key;
cout<<"ENTER THE
DATA ->"<<endl;
cin>>n->data;
ob.stenqueue(n);
break;
case 3:
cout<<"ENTER THE KEY
OF THE DATA ->"<<endl;
cin>>n->key;
cout<<"ENTER THE
DATA ->"<<endl;
cin>>n->data;
ob.lastenqueu(n);
break;
case 4:
ob.stdqueue();
break;
case 5:
ob.lastdqueue();
break;
case 6:
ob.display();
break;
default:
cout<<"...............ERROR..............."<<endl;
break;
}
}while(opt!=0);
return 0;
}