Problem Solving Through Programming In C NPTEL Week 12 Solutions

This set of MCQ(multiple choice questions) focuses on the Problem Solving Through Programming In C NPTEL Week 12 Solutions.

Problem Solving Through Programming In C NPTEL Week 2 Solutions

Course layout (Answers Link)

Answers COMING SOON! Kindly Wait!

NOTE: You can check your answer immediately by clicking show answer button. Problem Solving Through Programming In C NPTEL Week 12 assignment answers” contains 10 questions.

Now, start attempting the quiz.

Problem Solving Through Programming In C NPTEL Week 12 assignment answers

Q1. Which of the following are themselves a collection of different data types?

a) String
b) Array
c) Character
d) Structure

Answer: d) Structure

Q2. Which of the following comments about the usage structures is true?

a) Storage class can be assigned to individual member
b) Individual members can be initialized within a structure type declaration
c) The scope of the member name is confined to the particular structure, within which it is defined
d) None of the above

Answer: c)

Q3. What is actually passed if you pass a structure variable to a function?

a) Copy of structure variable
b) Reference of structure variable
c) Starting address of structure variable
d) Ending address of structure variable

Answer: a) Copy of structure variable

Q4. The program will allocate ……… bytes to ptr. Assume sizeof(int) = 4.

Answer: 8

Q5. Find the output of the following program

a) abcd
b) bcd
c) cd
d) abcdfgh

Answer: b) bcd

Problem Solving Through Programming In C NPTEL Week 12 assignment answers

Q6. What is the output?

a) 11100
b) 11
c) 11001
d) 11000

Answer: a) 11100

Q7. What is the output of the following C code? Assume that the address of x is 2000 (in decimal) and an integer requires four bytes of memory.

a) 2036, 2036, 2036
b) 2012, 4, 2204
c) 2036, 10, 10
d) 2012, 4, 6

Answer: a) 2036, 2036, 2036

Problem Solving Through Programming In C NPTEL Week 12 assignment answers

Q8. What does fp point to in the program?

a) The first character in the file
b) A structure which contains a char pointer which points to the first character of a file.
c) The name of the file.
d) The last character in the file

Answer: b)

Problem Solving Through Programming In C NPTEL Week 12 assignment answers

Q9. Choose a correct statement about C structure?
int main()
{
struct hello{};
return 0;
}

a) It is wrong to define an empty structure
b) Member variables can be added to a structure even after its first definition
c) There is no use of defining an empty structure
d) None of the above

Answer: c)

Q10. What is the output of the following C program?

a) True
b) False
c) No output
d) Compilation error

Answer: b) False

Problem Solving Through Programming In C NPTEL Week 12 assignment answers

<< Prev – An Introduction to Programming Through C Week 11 Solutions


DISCLAIMER: Use these answers only for the reference purpose. Quizermania doesn't claim these answers to be 100% correct. So, make sure you submit your assignments on the basis of your knowledge.

For discussion about any question, join the below comment section. And get the solution of your query. Also, try to share your thoughts about the topics covered in this particular quiz.

Leave a Comment

Your email address will not be published. Required fields are marked *