NPTEL( 14 Sep - 06 Nov ) | Week 1 Quiz Programming in CPP 2020

 



       Programming in C++       




Quiz ->Assignment 1:


1.Consider the following code segment.
Fill in the blank at line 1 with appropriate option/s such that the output is :10 20
Ans: c) (*p)[3].

2.Consider the following code segment.
What will be the output?
Ans: d)60 60 60

3.Consider the following code segment.
What will be the sizeof(shape) (consider the sizeof(int) = 4)?
Ans: c)16

4.Consider the following code segment.
What will be the output?
Ans: b)20

5.Consider the following code segment.
Fill in the blank with appropriate option/s, such that the output is:
90 40 30 20 10 50 70 60 80
Ans: b) data +9 ,d) & data[5]

6.Consider the following code segment.
Fill in the blank at LINE-1 such that the output is: Physical Science.
Ans: a) str1 +str2 ,d) str1.append(str2)

7.Consider the following code segment.
What will be the output?
Ans: a) 0 1 2 110  0

8.Consider the following code segment.
What will be the output/error?
Ans: b) 132

9.Consider the following code segment.
Which statement / statements are correct?
Ans: b) STMT-2


FOLLOW OUR WEBSITE FROM THE BUTTON PROVIDED TO THE BOTTOM OF PAGE TO GET SOON ANSWERS OF PROGRAMS.
Disclaimer: Here you can find all nptel assignment solutions related to CS stream.These may help you for your assignment.The answers are only for verification.You cannot copy these directly from the post(code of conduct of NPTEL).These is not 100%  correct solutions.

No comments:

Post a Comment

If you have any problems related to solutions or any concept please let me know.

Copyright (c) 2020 Custom Programs All Right Reserved

Pages