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

admin
By admin

NPTEL Problem Solving Through Programming In C Week 6 Assignment Solutions

[Week 1] NPTEL Problem Solving Through Programming In C Assignment Answers 2023

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.

W06Q05

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

Answer :- For Answer Click Here

6.

W06Q06

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?

W06Q07

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.

W06Q08

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

Answer :- For Answer Click Here

9.

W06Q09
Answer :- For Answer Click Here

10.

W06Q10

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
Course NameProblem Solving Through Programming In C
CategoryNPTEL Assignment Answer
Home Click Here
Join Us on TelegramClick Here

Share This Article
Leave a comment