Test Paper
Test Paper
Total Que: 50
Marks 50
4. A webpage displays a picture. What tag was used to display that picture?
a. picture b. image c.img d. src
Ans:c
5. <b> tag makes the enclosed text bold. What is other tag to make text bold?
a. <strong> b. <dar> c. <black> d. <emp>
Ans:a
6. Which CSS property controls the text size?
A. font-size
B. font-style
C. text-style
D. text-size
Ans: A
7. What is the correct CSS syntax for making all the <p> elements bold?
A. <p style=”text-size:bold”>
B. p {font-weight:bold}
C. p {text-size:bold}
D. <p style=”font-size:bold”>
Ans: B
9. How do you make each word in a text start with a capital letter?
A. text-transform:capitalize
B. You can’t do that with CSS
C. text-transform:uppercase
Ans: A
Answer: a
Answer: c
#include <stdio.h>
void main()
{
double k = 0;
for (k = 0.0; k < 3.0; k++)
printf("Hello");
}
Run time error
b) Hello is printed thrice
c) Hello is printed twice
d) Hello is printed infinitely
Answer: b
Ans: A
17. A deviation from the specified or expected behavior that is visible to end-users is called:
a) an error
b) a fault
c) a failure
d) a defect
Ans: C
23. Which of these operators is used to allocate memory to array variable in Java?
a) malloc
b) alloc
c) new
d) new malloc
View Answer
Answer: c
Explanation: Operator new allocates a block of memory specified by the size of an array, and
gives the reference of memory allocated to the array variable.
Answer: d
Explanation: Operator new must be succeeded by array type and array size.
Answer: a
Explanation: Array can be initialized using both new and comma separated expressions
surrounded by curly braces example : int arr[5] = new int[5]; and int arr[] = { 0, 1, 2, 3, 4};
Answer: a
28 _________________are used for generic programming.
a. Inheritance
b. Virtual Functions
c. Templates
d. None of these
ANSWER: Templates
29 In CPP, cin and cout are the predefined stream __________ .
a. Operator
b. Functions
c. Objects
d. Data types
ANSWER: Objects
30 Can constructors be overloaded?
a. Yes
b. No
ANSWER: Yes
31 Assume class TEST. Which of the following statements is/are responsible to invoke copy
constructor?
a. TEST T2(T1)
b. TEST T4 = T1
c. T2 = T1
d. both a and b
e. All of these
a. Yes
b. No
c. Can’t say
ANSWER: Yes
33 ____________ refers to the act of representing only essential features without including
the background details.
a. Data Hiding
b. Data Encapsulation
c. Data Abstraction
d. All of these
a. Function Overriding
b. Function Overloading
c. Both a and b
d. None of the above
a. Data Binding
b. Data Encapsulation
c. Data Storing
d. Data Abstraction
ANSWER:. Data Encapsulation
36 C structure differs from CPP class in regards that by default all the members of the
structure are __________ in nature.
a. private
b. protected
c. public
d. None of these
ANSWER: public
37. Which of these in not a core data type?
a) Lists
b) Dictionary
c) Tuples
d) Class
Answer: d
Explanation: Class is a user defined data type.
38. Given a function that does not return any value, What value is thrown by default when
executed in shell.
a) int
b) bool
c) void
d) None
View Answer
Answer: d
Explanation: Python shell throws a NoneType object back.
39. What will be the output of the following Python code?
>>>str="hello"
>>>str[:2]
>>>
a) he
b) lo
c) olleh
d) hello
Answer: a
Explanation: We are printing only the 1st two bytes of string and hence the answer is “he”.
40. Which of the following will run without errors?
a) round(45.8)
b) round(6352.898,2,5)
c) round()
d) round(7463.123,2,1)
Answer: a
Explanation: Execute help(round) in the shell to get details of the parameters that are passed
into the round function.
5. What is the return type of function id?
a) int
b) float
c) bool
d) dict
Answer: a
Explanation: Execute help(id) to find out details in python shell.id returns a integer value that is
unique.
Answer: d
Explanation: The loop does not terminate as new elements are being added to the list in each
iteration.
Answer: a
Explanation: Control exits the loop when i becomes 7.
Answer: B
45. What will be the output of the following JavaScript code?
var a1 = [,,,];
var a2 = new Array(3);
0 in a1
0 in a2
a) true false
b) false true
c) true true
d) false true
Answer: a
Explanation: Array a1 is defined with null values. Therefore we can access the indexes 0, 1 and
2. But array a2 is only defined not declared. Therefore we cannot access index 0.
46. The pop() method of the array does which of the following task?
a) decrements the total length by 1
b) increments the total length by 1
c) prints the first element but no effect on the length
d) updates the element
Answer: a
Explanation: pop() function pops out that is delete the last element from the array. Hence pop()
method (it works with push()) reduces the length of an array by 1.
47. You can add a row using SQL in a database with which of the following?
A. ADD
B. CREATE
C. INSERT
D. MAKE
Answer: Option C
48. Which data manipulation command is used to combines the records from one or more
tables?
A.SELECT B.PROJECT
C.JOIN D.PRODUCT
Answer : JOIN [Option : C]
50. Q.
The SQL used by front-end application programs to request data from the DBMS is called
_______
A.DML B.DDL
C.VDL D.SDL
Answer: DML [Option: A]