Tag Archives: array


Write a program to do linear search for an integer in 20 distinct numbers. The program should return the location of an element – IGNOU BCA Assignment 2015 – 16

BACHELOR OF COMPUTER APPLICATIONS Course Code : BCSL-045 Course Title : Introduction to Algorithm Design Lab Assignment Number : BCA(IV)/L-045/Assignment/2015 Maximum Marks : 50 Weightage : 25% Write a program to do linear search for an integer number in an array of 20 distinct numbers. The program should return the location of an element if… Read More »

Write an algorithm for the implementation of a multiple queues in a single dimensional array – IGNOU MCA Assignment 2015 – 16

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-021 Course Title : Data and File Structures Assignment Number : MCA(II)/021/Assignment/15-16 Maximum Marks : 100 Weightage : 25% Implement multiple queues in a single dimensional array. Write algorithms for various queue operations for them .   #include <stdio.h> #define MAX 20 void insert_que1(int *,int *,int *,int); void insert_que2(int… Read More »

Write and Implement multiple stacks in a single dimensional array – IGNOU MCA Assignment 2014-15

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-021 Course Title : Data and File Structures Assignment Number : MCA(2)/021/Assign/2014-15 Maximum Marks : 100 Weightage : 25%   Implement multiple stacks in a single dimensional array. Write algorithms for various stack operations for them.   #include <stdio.h> #define max 10 int top1, top2, stk_arr[max]; void push();… Read More »

A C program and algorithm to implement stack in a single dimensional array – IGNOU MCA Assignment 2014 – 15

MASTER OF COMPUTER APPLICATIONS Course Code : MCS-021 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/021/Assign/13 Assignment 2013   Implement stack in a single dimensional array. Write algorithms for various stack operations for them.   #include <stdio.h> #define MAX 10 /* The maximum size of the stack */ void push(int [],int *,int);… Read More »

An Assembly Language program to find minimal and maximal elements – IGNOU MCA Assignment 2014 – 15

 MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-017 Course Title : C and Assembly Language Programming Assignment Number : MCA(1)/L017/Assign/2014-15 Maximum Marks : 100 Weightage : 25%   Develop and execute an assembly language program to read an array of numbers and find the minimal and maximal elements.    DATA SEGMENT ARR DB 5,3,7,1,9,2,6,8,4 LEN… Read More »

Write a program in C’ that accepts 10 words of varying length and arranges the words in the descending order of word length. Use arrays. 10m Dec2006

Write a program in C’ that accepts 10 words of varying length and arranges the words in the descending order of word length. Use arrays. 10m Dec2006 #include<stdio.h> #include<string.h> void main() { int i,j; char array[10][10],temp[10]; clrscr(); printf(“Enter ten words : \n”); for(i=0;i<10;i++) { printf(“%d : “,i+1); gets(array[i]); } for(i=0;i<10;i++) { for(j=i;j<10;j++) { if(strlen(array[i])<strlen(array[j])) {… Read More »

Write a program in ‘C’ for the addition of two polynomials. Use Arrays and Structures. 10m Dec2006

Write a program in ‘C’ for the addition of two polynomials. Use Arrays and Structures. 10m Dec2006 #include<stdio.h> void main() { int poly1[6][2],poly2[6][2],term1,term2,match,proceed,i,j; printf(“Enter the number of terms in first polynomial : “); scanf(“%d”,&term1); printf(“Enter the number of terms in second polynomial : “); scanf(“%d”,&term2); printf(“Enter the coeff and expo of the first polynomial:\n”); for(i=0;i<term1;i++)… Read More »

Write a program to sort a list of strings in alphabetical order, using an array of pointers. 10m Jun2006

Write a program to sort a list of strings in alphabetical order, using an array of pointers. 10m Jun2006 #include<stdio.h> void main() {     char *T;     int I,J,K;     char *ARRAY[5]={“SUNIL”,”ANIL”,”DILIP”,”JAY”,”BHARAT”};     clrscr();     for(I=0;I<5;I++)     {        printf(“%s \t”,ARRAY[I]);     }     printf(“\n”);     for(I=0;I<4;I++)     {       for(J=0;J<4-I;J++)       {  K=strcmp(ARRAY[J],ARRAY[J+1]);  if(K>0)… Read More »

An Assembly Lanuage Program, which converts string to its ASCII value and store in array

Now we will write another Assembly Lanuage Program, which converts string to its ASCII value and store in array Let’s identify variables needed for this program. Let’s identify variables needed for this program. First variables will be the one which will hold the Strings entered by user in the variables P1 LABEL BYTE    M1 DB 0FFH    L1… Read More »

An Assembly program to conduct a binary search on a given sorted array of 16-bit, unsigned integers, and a given 16-bit unsigned key

Now we will write another Assembly program to conduct a binary search on a given sorted array of 16-bit, unsigned integers, and a given 16-bit unsigned key.   The above Logic is a C like Program to conduct a binary search we need small Algorithm Shown above in a very simple way, So Just we will covert… Read More »