# Category Archives: C Programming & Data Structure

## Write an interactive C program to calculate the sum of array element using pointer – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18 Program: #include<stdio.h> void main() { int ARRAY[]={1,2,3,4,5,6,7,8,9,0}; int I,*PTR,SUM=0; clrscr(); PTR=&ARRAY; while(*PTR) {… Read More »

## Write a C program to determine a given matrix is a sparse matrix – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18 Program: #include<stdio.h> void main() { int MATRIX[10][10]; int I,J,M,N; int COUNT=0; clrscr(); printf(“ENTER… Read More »

## Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a program to find the largest element in an array using Recursion – IGNOU MCA Assignment 2017 – 18  Program: #include<stdio.h> int LARGE=-1; void main() { int NUM[10],I; void largest_rec(int *); clrscr();… Read More »

## A C program to separate even and odd of array put them in two arrays – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Write a C program to separate even and odd numbers of an array and put them in two arrays.- IGNOU MCA Assignment 2017 – 18   Program: #include<stdio.h> void main() { int I,J=0,K=0,NUM[]={1,2,3,4,5,6,7,8,9,10},EVEN[10],ODD[10];… Read More »

## A C program to convert an octal number to its equivalent decimal number – IGNOU MCA Assignment 2017 – 18

MASTER OF COMPUTER APPLICATIONS Course Code: MCS-011 Course Title : Problem Solving and Programming Assignment Number : MCA(1)/011/Assign/2017-18 Maximum Marks : 100 Weightage : 25% Draw a flow chart and write its corresponding C program to convert an octal number to its equivalent decimal number.- IGNOU MCA Assignment 2017 – 18   Flowchart: #include<stdio.h> #include<math.h>… Read More »

## Write a macro to demonstrate #define, #if, #else preprocessor commands. 6m Jun 2010

Write a macro to demonstrate #define, #if, #else preprocessor commands. 6    Code: #include <stdio.h> #define CHOICE 100 int my_int = 0; #if (CHOICE == 100) void set_my_int() { my_int = 35; } #else void set_my_int() { my_int = 27; } #endif main () { set_my_int(); clrscr(); printf(“%d\n”, my_int); getch(); } Screen Shots:

## What do you understand by a decision-control statement? Give an example of each. 8m Jun 2010

What do you understand by a decision-control statement? Give an example of each. 8 In a C program, a decision causes a one-time jump to a different part of the program, depending on the value of an expression. Decisions in C can be made in several ways. The most important is with the if…else statement,… Read More »

## Explain the difference between a top-down approach and a bottom-up approach in programming. 5m Jun 2010

Explain the difference between a top-down approach and a bottom-up approach in programming. 5m Jun 2010   Top-down Approach Bottom-up Approach A top-down approach is essentially the breaking down of a program to gain insight into its compositional small program (or module) in a reverse engineering fashion. A bottom-up approach is the piecing together of… Read More »

## Write a program in ‘C’ to find a sum of square of odd numbers. 6m Jun 2010

Write a program in ‘C’ to find a sum of square of odd numbers :- 12 +32+ 52+ 72 +92+ +N2   Code:- #include<stdio.h> void main() { int NUM,i,j,SUM=0; clrscr(); printf(“\nENTER INTERGER NUMBER : “); scanf(“%d”,&NUM); for(i=1;i<NUM+1;i++) { if(i%2!=0) { SUM=SUM+(i*i); } } printf(“\nTHE SUM OF SQUARE OF ODD NOS. TILL %d NO. IS : %d”,NUM,SUM);… Read More »