Header Ads

IGNOUASSIGNMENTS2018-19


IGNOU MCA Solved Assignments 2019-20

Click Here to Download  BCA 2nd Semester Solved Assignments 

Question 1: Obtain the minimum cost spanning tree for the following graph using PRIMS algorithm
Question 2: Obtain the BFS tree for the above graph, given in Question No. 1 above 
Question 3: Write a context free grammar to generate palindromes of even length Over alphabet ∑ = {a, b}. 
Question 4: Write the finite automata corresponding to the regular expression (a + b)*ab 

Question 5: Derive the principle of optimality for multiplication of matrix chain. 

Question 6: Compute the optimal number of scalar multiplications required to multiply the following matrices. A1 of order 30 X 35 ; A2 of order 35 X 15 ; A3 of order 15 X 5 

Question 7: Explain the Chomsky’s Classification of grammars. 

Question 8: What is an ambiguous grammar? How do you prove that a given grammar is ambiguous? Explain with an example. 

Question 9: If L1 and L2 are context free languages then, prove that L1 U L2 is a context free language. 

Question 10: Define Pushdown Automata. 

Question 11: Explain Decidable and Undecidable Problems. Give example for each

IGNOU MCA 2nd Semester Solved Assignment 2018-19 

IGNOU MCS-024 Operating System Concepts and Networking Management Solved Assignment 2018-19 Download Now 
IGNOU MCS024 SOLVED ASSIGNMENT 2018-19

IGNOU MCA-1st Semester Solved Assignment 2018-19 Available now for All 


IGNOU MCA 1ST SEMESTER SOLVED ASSINGMENT 2018-19


IGNOU MCSL-017 SOLVED ASSIGNMENT 2018-19 DOWNLOAD NOW 

MCSL-16 INTERNET CONCEPT AND WEB DESIGN SOLVED ASSIGNMENT 2018-19 DOWNLOAD NOW
MCS-011 SOLVED ASSIGNMENT CLICK HERE TO DOWNLOAD 

MCS-014 SYSTEM ANALYSIS AND DESIGN SOLVED ASSIGNMENT 2018-19 CLICK HERE TO DOWNLOAD

MCS-013 DISCRET MATHEMATICS SOLVED ASSIGNMENT 2018-19 CLICK TO DOWNLOAD 

IGNOU MCS-012 COMPUTER ORGANISATION AND ASSEMBLY LANGUAGE PROGRAMMING  SOLVED ASSIGNMENT DOWLOAD NOW

MCS-011 IGNOU MCA IST SEMESTER ASSIGNMENT 2018-19

IGNOU MCA MCS-33 ADVANCE DISCRETE MATHEMATICS SOLVED ASSIGNMENT DOWNLOAD NOW 

DOWNLOAD NOW

IGNOU MCA MCS-034 SOFTWARE ENGINEER SOLVED ASSIGNMENTS 






Question1 : Write an algorithm, draw a flow chart and write its corresponding C program to convert a decimal number to its equivalent hexadecimal number


Ans: /*
 * C program to Convert Decimal to Hexadecimal
 */
#include <stdio.h>
 #include<conio.h>
int main()
{
    long decim, quotient, remainder;
    int i, j = 0;
    char hexd[100];
     printf("Enter decimal number: ");
    scanf("%ld", &decim);
     quotient = decim;

    while (quotient != 0)
    {
        remainder = quotient % 16;
        if (remainder < 10)
            hexd[j++] = 48 + remainder;
        else
            hexd[j++] = 55 + remainder;
        quotient = quotient / 16;
    }

    // display integer into character
    for (i = j; i >= 0; i--)
            printf("The Hexadecimal number is %c", hexd[i]);
    return 0;
}


Algorithms convert Decimal to Hexadecimal

Step 1:  Input DECINUM
Step 2:  quotient =DECINUM
Step 3:  While (quotient != 0)
Remainder=  quotient % 16                     
if (remainder < 10)
            hexd[j++] = 48 + remainder
else
            hexd[j++] = 55 + remainder
        quotient = quotient / 16
for (i = j; i >= 0; i--)
            printf("The Hexadecimal number is %c", hexd[i])





Flowchart for to decimal to hexadecimal



Question2: Write an algorithm and its corresponding C program to generate students’ Progress-Report for VIII standard (section of 20 students) of a CBSE school for all its 4 terms. Use Structures concept. Assumptions can be made wherever necessary.

Answer:
#include<stdio.h>
#include<conio.h>
struct student
{
int RL;
char NAME[15];
int S1T1,S1T2,S1T3,S1T4,S2T1,S2T2,S2T3,S2T4,S3T1,S3T2,S3T3,S3T4
,S4T1,S4T2,S4T3,S4T4,S5T1,S5T2,S5T3,S5T4,S6T1,S6T2,S6T3,S6T4;

}
STUD[12]={
{1,”Ramesh” 
,25,60,28,65,35,80,35,40,35,68,37,72,37,90,38,55,34,27,31,38,35,87,28
69},
{2,”Dinesh” 
,35,60,36,67,31,46,36,38,25,55,49,36,28,39,37,49,27,27,34,26,31,25,31,
18},
{3,”Vijay”  ,21,9,27,7,26,7,28,7,31,6,29,6,28,9,37,9,27,7,34,6,31,5,31,8},
{4,”Jaswinder”
,28,39,37,49,27,47,34,36,31,65,31,88,21,39,27,67,26,77,28,77,31,6,29,6
},
{5,”Aakash”  
,27,7,36,5,34,7,31,8,35,7,26,9,21,9,27,7,26,7,28,7,31,6,29,6},
{6,”Randeep”  
,29,9,34,7,38,9,37,7,34,9,36,8,25,8,37,9,34,7,35,7,27,9,26,7},
{7,”Mukesh”,25,8,37,9,34,7,35,7,27,9,26,7,29,9,34,7,38,9,37,7,34,9,36,8},
{8,”Jagtar”   
,25,6,38,7,35,8,25,7,27,9,26,6,27,7,36,5,34,7,31,8,35,7,26,9},
{9,”Dharampal”,35,6,37,37,34,82,36,38,37,27,34,29,28,69,37,39,27,27,34
,26,31,25,31,28},
{10,”Harish”  
,35,7,37,6,34,5,35,7,37,6,36,5,21,9,27,7,26,7,28,7,31,6,29,6},
{11,”Gulshan” 
,25,5,28,7,25,5,26,6,25,6,34,5,35,6,26,7,31,6,36,8,25,5,29,6},
{12,”Nishant”
,35,57,38,35,35,6,36,25,35,34,26,15,25,36,28,26,35,28,26,24,35,26,34,4
7}
};
void main()
{

int RL_NO;
void gen_result(int);
clrscr();

printf(“ENTER RL no (1 to 12) : “);
scanf(“%d”,&RL_NO);
if(RL_NO>0 && RL_NO<13)
gen_result(RL_NO);
else
printf(“\nYOU HAVE ENTERED WRONG ENROLMENT NO. !!”);
getch();
}
void gen_result(int RL)
{
char STATS;
int M01,M02,M03,M04,M05,M06;
M01=STUD[RL-1].S1T1+STUD[RL-1].S1T2+STUD[RL-1].S1T3+STUD[RL-
1].S1T4;
M02=STUD[RL-1].S2T1+STUD[RL-1].S2T2+STUD[RL-1].S2T3+STUD[RL-
1].S2T4;
M03=STUD[RL-1].S3T1+STUD[RL-1].S3T2+STUD[RL-1].S3T3+STUD[RL-
1].S3T4;
M04=STUD[RL-1].S4T1+STUD[RL-1].S4T2+STUD[RL-1].S4T3+STUD[RL-
1].S4T4;
M05=STUD[RL-1].S5T1+STUD[RL-1].S5T2+STUD[RL-1].S5T3+STUD[RL-
1].S5T4;
M06=STUD[RL-1].S6T1+STUD[RL-1].S6T2+STUD[RL-1].S6T3+STUD[RL-
1].S6T4;
printf(“\n\t\t\t GOVT.SR.SECONDARY  SCHOOL CHANDIGARH”);
printf(“\n\t\t\tPROGRESS CARD : (2018-2019)”);
printf(“\n\n\tRL NO.\t: %d”,RL);
printf(“\n\tNAME\t\t: %s”,STUD[RL-1].NAME);
printf(“\n\tSTANDARD \t: VIII\t\tDIV\t: A”);
printf(“\n
\t_______________________________________________________________”);
printf(“\n\tCOURSE\t\t1_TERM\t2_TERM\t3_TERM\t4_TERM\tTOTAL”);
printf(“\n\t CODE\t\t(40%)\t(10%)\t(40%)\t(10%)\t(100%)\tSTATS”);
printf(“\n
\t_______________________________________________________________”);
if(M01<40) STATS=’F'; else STATS=’P';
printf(“\n\tENGLISH\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[RL-1].S1T1,STUD
[RL-1].S1T2,STUD[RL-1].S1T3,STUD[RL-1].S1T4,M01,STATS);
if(M02<40) STATS=’F'; else STATS=’P';
printf(“\n\n\tHINDI\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[RL-1].S2T1,STUD
[RL-1].S2T2,STUD[RL-1].S2T3,STUD[RL-1].S2T4,M02,STATS);
if(M03<40) STATS=’F'; else STATS=’P';
printf(“\n\n\tMATHS\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[RL-
1].S3T1,STUD[RL-1].S3T2,STUD[RL-1].S3T3,STUD[RL-1].S3T4,M03,STATS);
if(M04<40) STATS=’F'; else STATS=’P';
printf(“\n\n\tSOCIAL\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[RL-
1].S4T1,STUD[RL-1].S4T2,STUD[RL-1].S4T3,STUD[RL-1].S4T4,M04,STATS);
if(M05<40) STATS=’F'; else STATS=’P';
printf(“\n\n\tSCIENCE\t\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[RL-
1].S5T1,STUD[RL-1].S5T2,STUD[RL-1].S5T3,STUD[RL-1].S5T4,M05,STATS);
if(M06<40) STATS=’F'; else STATS=’P';
printf(“\n\n\tSANSKRIT\t%d\t%d\t%d\t%d\t%d\t%c”,STUD[RL-
1].S6T1,STUD[RL-1].S6T2,STUD[RL-1].S6T3,STUD[RL-1].S6T4,M06,STATS);
printf(“\n
\t_______________________________________________________”);
printf(“\n\t\t\tP :- PASSED\t\tF :- FAILED”);
}

Compile Program Studentstruct.c

0 comments:

Post a Comment