Tag Archives: array

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 »

An Assembly Program, which should add two 5-byte numbers (numbers are stored in array- NUM1 & NUM2), and stores the sum in another array named RESULT

Now we will write another Assembly Program, which should add two 5-byte numbers (numbers are stored in array- NUM1 & NUM2), and stores the sum in another array named RESULT. Let’s identify variables needed for this program. First variables will be the one which will hold the values present in the Given Arrays and it… Read More »

ASSEMBLY27 An Assembly program for adding an array of Binary Digits

Now we will write another Assembly program for finding the largest number in array of 10 elements. First variables will be the one which will hold the value discovered as the Sum of All the Binary Digits in Array list and it will be RES and Second will be the one which will hold the values present in the Given… Read More »

ASSEMBLY21 An Assembly program for finding the largest number in array of 10 elements

Now we will write another Assembly program for finding the largest number in array of 10 elements. First variables will be the one which will hold the value discovered as the Largest of All the Numbers in Array list and it will be LARGE and Second will be the one which will hold the values present in the Given Numbers… Read More »

A Assembly program to calculate average of numbers in an Array – IGNOU MCA Assignment 2013

MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-017 Course Title : C and Assembly Language Programming Assignment Number : MCA(1)/L017/Assign/2013   A program in assembly language to calculate the average of numbers in an array.   DATA SEGMENT ARRAY DB 1,4,2,3,8,6,7,5,9 AVG DB ? MSG DB “AVERAGE = $” ENDS CODE SEGMENT ASSUME DS:DATA CS:CODE… Read More »

C029 A C program with a function that returns the minimum and the maximum value in an array of integers

void minmax(int array[],int length,int *min,int *max); //prototype Let’s identify variables needed for this program. In this program, we need several variables to store array of decimal numbers and count the length of array and store minimum and maximum of the array. First variable will be the one which will save the list of integers in… Read More »