Tag Archives: program

Write a program that does not use the inbuilt string function to concatenate two strings 10m Jun2009

Write a program that does not use the inbuilt string function to perform the following: 10m Jun2009 (ii) To concatenate two strings Code:- #include<stdio.h> void main() { void str_concat(char*,char*,char*); char Str1[50],Str2[50],Str3[100]; clrscr(); printf(“\nENTER FIRST STRING TO CONCATE : “); scanf(“%s”,&Str1); printf(“\nENTER SECOND STRING TO CONCATE : “); scanf(“%s”,&Str2); str_concat(Str1,Str2,Str3); printf(“\nSTR1 IS : %s”,Str1); printf(“\nSTR2 IS :… Read More »

Write a program in ‘C’ to check whether the given year is leap or not. Also explain the logic of the program. 8m Dec2008

Write a program in ‘C’ to check whether the given year is leap or not. Also explain the logic of the program. 8m Dec2008 The leap year formula is: A leap year is divisable by 4, but not by 100 (except if divisable by 400.)   #include<stdio.h> void main(){ int year; clrscr(); printf(“Enter any year:… Read More »

When can two matrices of order m x n and p x q be multiptied? Also write a program in ‘C’ to multiply two such matrices. 10m Dec2008

When can two matrices of order m x n and p x q be multiptied? Also write a program in ‘C’ to multiply two such matrices. 10m Dec2008   The only condition which makes matrix multiplication possible is n should be equal to p (i.e. n==p) n of m x n Matrix and p of… Read More »

Write a program in 8086 assembly Ianguage that converts each character of string to upper case and to the next character 7m Jun2008

Write a program in 8086 assembly Ianguage that accepts a character string, of maximum 10 characters, from the keyboard, converts each character of string to upper case and converts each character to the next character. i.e. A to B, B to C,and so on. Finally display the string on the screen. 7m Jun2008   DATA… Read More »

Write an Algorithm and a Program that accepts a Binary Tree as input and checks whether it is a Height Balanced Tree – IGNOU BCA Assignment 2015 – 16

BACHELOR OF COMPUTER APPLICATIONS Course Code : BCSL-033 Course Title : Data and File Structures Lab Assignment Number : BCA(III)/L-033/Assignment/2015 Maximum Marks : 50 Weightage : 25% Write an Algorithm and a Program that accepts a Binary Tree as input and checks whether it is a Height Balanced Tree. #include <stdio.h> #include <stdlib.h> struct tnode… Read More »

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 a program to sort data using a selection sort algorithm – 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 sort data using a selection sort algorithm. #include<stdio.h> void main() { int MIN,MIN_POS,I,J,TEMP,List[]={6,3,0,4,8,2,5,9,1,7}; int N=10; clrscr(); printf(“\n****SELECTION SORT****\n”); printf(“\n\nList Before Sorting :\n\n”); for(J=0;J<N;J++) {… Read More »

Write a program that finds the two smallest numbers in an array of n numbers – 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 that finds the two smallest numbers in an array of n numbers. #include<stdio.h> void main() { int I,J,Temp,List[]={6,3,0,4,8,2,5,9,1,7}; clrscr(); printf(“\nElement in Array :\n\n”); for(J=0;J<10;J++) {… Read More »

Write a program in C language that will accept a Graph as input and will generate its Minimum Cost Spanning Tree – IGNOU MCA Assignment 2015 – 16

MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-025 Course Title : Lab Course Assignment Number : MCA(II)/L-025/Assignment/15-16 Maximum Marks : 50 Weightage : 25%   Write a program in C language that will accept a Graph as input and will generate its Minimum Cost Spanning Tree. #include <stdio.h> #define MAXVERTICES 10 #define MAXEDGES 20 typedef… Read More »

Write a program in C language for addition of two numbers which have at least 20 digits each – IGNOU MCA Assignment 2015 – 16

MASTER OF COMPUTER APPLICATIONS Course Code : MCSL-025 Course Title : Lab Course Assignment Number : MCA(II)/L-025/Assignment/15-16 Maximum Marks : 50 Weightage : 25% Write a program in C language for addition of two numbers which have at least 20 digits each.   #include<stdio.h> void main() { int I,J,NUM1[20],NUM2[20],RES[21]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; char N1[21],N2[21];/*getchar is excepts NewLIne charter… Read More »