Programming in JAVA.
Assignment 1:
1. Which of the following code fragment(s) is /are true?
Ans: All a,b,c,d.
2.Which of the following is not a valid comment?
Ans: c. /*comment.
3.Which of the following is not an object-oriented programming paradigm?
Ans: d. Dynamic memory allocation.
4.Which of the following is not a correct statement?
Ans: a. It is always necessary to use new operator to initialize an array.
5.When you compile a program written in the java programming language, the compiler converts the human-readable source file into platform - independent code that a java Virtual Machine can understand . What is this platform - independent code called?
Ans: b. Bytecode.
6.Consider the foll program.
Ans: a. 3
7.Why an array is called "homogeneous collection of data" in java?
Ans: c. Array can store only one type of data.
8.Which of the foll can be used for a variable name in java?
Ans: d. calloc
9.Which of the following statement is/are correct?
Ans: a. The output Statement 1 is NPTEL2010
d. The output Statement 2 is 30java
10. What will be the output of the fill code?
Ans: d. Compilation Error
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.