Problem Solving Through Programming In C | NPTEL 2023 | Week 7 Assignment Solutions
ABOUT THE COURSE :
This course is aimed at enabling the students to
- Translate the algorithms to programs (in C language)
- Formulate simple algorithms for arithmetic and logical problems
- Test and execute the programs and correct syntax and logical errors
- Implement conditional branching, iteration and recursion
- Decompose a problem into functions and synthesize a complete program using divide and conquer approach
- Use arrays, pointers and structures to formulate algorithms and programs
- Apply programming to solve matrix addition and multiplication problems and searching and sorting problems
- Apply programming to solve simple numerical method problems, namely rot finding of function, differentiation of function and simple integration
Course Status : Upcoming
Course Type : Elective
Duration : 12 weeks
Start Date : 23 Jan
2023
End Date : 14 Apr 2023
Exam Date : 29 Apr 2023 IST
Enrollment Ends : 06 Feb 2023
CRITERIA TO GET A CERTIFICATE :
Average assignment score = 25% of average of best 8 assignments out of the total 12 assignments given in the course.
Exam score = 75% of the proctored certification exam score out of 100
Final score = Average assignment score + Exam score
YOU WILL BE ELIGIBLE FOR A CERTIFICATE ONLY IF AVERAGE ASSIGNMENT SCORE >=10/25 AND EXAM SCORE >= 30/75. If one of the 2 criteria is not met, you will not get the certificate even if the Final score >= 40/100.
NOTE: Please note that there will not be an unproctored programming exam for this course this term.
Week 7 Programming Assignment 1 :-
Week 7 Programming Assignment 1
int v = 0; while (ch[v] != '\0') { if (ch[v] >= 'A' && ch[v] <= 'Z') upper++; if (ch[v] >= 'a' && ch[v] <= 'z') lower++; v++; }
Week 7 Programming Assignment 2 :-
Week 7 Programming Assignment 2
int ans; for(i=0;i < r;i++) { ans=0; for(j=0;j < c;j++) { ans+= matrix[i][j]; } printf("%d\n",ans); } }
Week 7 Programming Assignment 3 :-
Week 7 Programming Assignment 3
for(int i1=0; i1 < row; i1++) { for(int kk=0; kk < col; kk++) { matrix_C[i1][kk] = matrix_A[i1][kk] - matrix_B[i1][kk]; } } for(i=0; i < row; i++) { for(j=0; j < col; j++) { printf("%d ", matrix_C[i][j]); } printf("\n"); } return 0; }
Week 7 Programming Assignment 4 :-
Week 7 Programming Assignment 4
for(int rows = 0; rows < i; rows++) { printf("\n"); for(int columns = 0; columns < j; columns++) { if(rows >= columns) { printf("%d ", matrix[rows][columns]); } else { printf("0 "); } } } return 0; }
Follow Us