Problem Solving Through Programming In C | NPTEL 2023 | Week 6 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 6 Programming Assignment 1 :-
Week 6 Programming Assignment 1
largest = arr[0]; for(i = 1; i < n; ++i) { if(largest < arr[i]) { largest = arr[i]; } } printf("Largest element = %d", largest); return 0; }
Week 6 Programming Assignment 2 :-
Week 6 Programming Assignment 2
int w, temp; w = i - 1; i = 0; while (i < w) { temp = arr[i]; arr[i] = arr[w]; arr[w] = temp; i++; w--; }
Week 6 Programming Assignment 3 :-
Week 6 Programming Assignment 3
int s; for (i=0;i < n1;++i) array_new[i]=arr1[i]; size = n1 + n2; for(i=0, s=n1; s< size &&i < n2; ++i, ++s) array_new[s] = arr2[i];
Week 6 Programming Assignment 4 :-
Week 6 Programming Assignment 4
while (pos < num) { array[pos - 1] = array[pos]; pos+=1; } num-=1;
Follow Us