NPTEL Problem Solving Through Programming In C Week 6 Assignment Answers 2023

Join Our WhatsApp Group Join Now
Join Us On Telegram Join Now

NPTEL Problem Solving Through Programming In C Week 6 Assignment Solutions

Table of Contents:-

NPTEL Problem Solving Through Programming In C Week 6 Assignment Answers 2023

1. What is an array in C?
a) A collection of similar data elements with the same data type.
b) A built-in function that performs mathematical calculations.
c) A keyword used for declaring variables.
d) A data type used to store characters only.

`Answer :-A`

2. What is the index of the first element in an array?
a) 0
b) 1
c) -1
d) The index can vary depending on the array size.

`Answer :- A`

3. Which loop is commonly used to iterate through all elements of an array in C?
a) for loop
b) while loop
c) do-while loop
d) switch loop

`Answer :- For Answer Click Here`

4. An integer array of 15 elements is declared in a C program. The memory location of the first byte of the array is 2000. What will be the location of the 13th element of the array? Assume int takes 2 bytes of memory.
a) 2013
b) 2024
c) 2026
d) 2030

`Answer :- For Answer Click Here`

5.

Option (a)
Option (b)
Option (c)
Option (d)

`Answer :- For Answer Click Here`

6.

a) 1 3 5
b) 1 2 3 4 5
c) 1 2 3
d) 1 4

`Answer :- For Answer Click Here`

7. What is be the output?

a) i=5, j=5, k=2
b) i=6, j=5, k=3
c) i=6, j=4, k=2
d) i=5, j=4, k=2

`Answer :- For Answer Click Here`

8.

a) 1
b) 2
c) 3
d) 4

`Answer :- For Answer Click Here`

9.

`Answer :- For Answer Click Here`

10.

a) 5, 4
b) 5, 5
c) 4, 4
d) 3, 4

`Answer :- For Answer Click Here`

NPTEL Problem Solving Through Programming In C Week 6 Programming Assignment 2023

Week 6 : Programming Assignment 1

Write a C Program to find Largest Element of an Integer Array.
Here the number of elements in the array ‘n’ and the elements of the array is read from the test data.
Use the printf statement given below to print the largest element.

printf(“Largest element = %d”, largest);

`Answer :- For Answer Click Here`

Week 6 : Programming Assignment 2

Write a C Program to print the array elements in reverse order (Not reverse sorted order. Just the last element will become first element, second last element will become second element and so on)
Here the size of the array, ‘n’ and the array elements is accepted from the test case data. The last part i.e. printing the array is also written.
You have to complete the program so that it prints in the reverse order.

`Answer :- For Answer Click Here`

Week 6 : Programming Assignment 3

Write a C program to read Two One Dimensional Arrays of same data type (integer type) and merge them into another One Dimensional Array of same type.

`Answer :- For Answer Click Here`

Week 6 : Programming Assignment 4

Write a C Program to delete duplicate elements from an array of integers.

`Answer :- For Answer Click Here`