Problem Solving Through Programming In C Nptel Week 10 Assignment Answers

Are you looking for the Problem Solving Through Programming In C Assignment 10 Answers ? You’ve come to the right place! This resource offers comprehensive solutions to the Week 10 assignment questions, focusing on fundamental concepts in C programming.



Problem Solving Through Programming In C Assignment 10 (Jan-Apr 2025)

Course Link: Click Here


1. How can you improve the best-case efficiency in bubble sort?
a)
b)
c)
d)

View Answer


2. Bisection method is used to find:

a) Derivative of a function at a given point
b) Numerical integration of a function within a range
c) Root of a function
d) None of the above

View Answer


3. In ……………, search starts at the beginning of the list and checks every element in the list.

a) Linear search
b) Binary search
c) Hash search
d) Binary tree search

View Answer


4. What is the output of the following program?

#include <stdio.h>
void func(int x)
int main()
int y = 30;
ftnc(y);
printf("%d", y);
return 0;

a) 40
b) 30
c) Compilation error
d) Runtime error

View Answer


5. Assuming an initial range [1,5], the second (at the end of 2 iterations) iterative value of the root of te^t — 0.3 = 0 using the bisection method is (Note: you need to find the root, not the function value).

View Answer


6. What would be the equivalent pointer expression for referring to the array element a[i][j][k][l]?

a) ((((a+i)+j)+k)+l)
b) ((
((a+i)+j)+k)+l)
c) (
(*(a+i)+j)+k+l)
d) *((a+i)+j+k+l)

View Answer


7. What will be the output when you execute the following C code?

#include<stdio.h>
int main()
short ;
printf("%d %d",*(num+2)[0],**(num+1));
return 0;

a) 23,11
b) 23,23
c) 11,17
d) 17,17

View Answer


8. Assume sizeof an integer and a pointer is 2 bytes. What is the output?

#include <stdio.h>
#define A 5
#define B 8
int main()
int (*x)[A][B];
printf("%d", sizeof(*x));
return 0;

a) 40
b) 80
c) 120
d) 160

View Answer


9. Find the output of the following program:

#include <stdio.h>
int main()
int *ptr, a = 7;
ptr &a;
*ptr = *ptr - 2;
printf("%d %d ", *ptr, a);
return 0;

View Answer


10. What is the solution of the equation given below using the Bisection Method up to four decimal places? (Consider the root lying on the positive quadrant only and compute the root till five iterations only)

Equation:
2x — 3x² — 5

View Answer


Problem Solving Through Programming In C Assignment 10

More NPTEL Solution: https://progiez.com/nptel

Problem Solving Through Programming In C Assignment 10