Académique Documents
Professionnel Documents
Culture Documents
{
~Casting refers to implicit type conversion.
=Coercion refers to implicit type conversion.
~Casting means coercion.
~Coercion refers to explicit type conversion.
}
The control automatically passes to the first statement after the loop in
{
~continue statement
=break statement
~switch statement
~if statement
}
The number of arguments supplied from the command line, by convention, is known as
{
=arg c
~arg v
~#define
~#include
}
puts(argv[0]);
{
~prints the name of the source code file.
~prints argv.
~prints the number of command line arguments.
=prints the name of the executable code file.
}
The number of nodes in a complete binary tree of depth d (with root at depth 0) is
{
~2d − 1 + 1
=2d + 1 − 1
~2d − 1 − 1
~2d + 1 + 1
}
Inorder to get the information stored in a BST in the descending order, one should
traverse it in which of the following order?
{
~left, root, right
~root, left, right
=right, root, left
~right, left, root
}
In a binary tree, the number of terminal or leaf nodes is 10. The number of nodes
with two children is
{
=9
~11
~15
~20
}
How many distinct binary search trees can be formed which contains the integers 1,
2, 3?
{
~6
=5
~4
~3
}
A binary tree stored using linked representation can be converted to its mirror
image by traversing it in
{
~Inorder.
=Preorder.
~Postorder.
~Any order.
}
The largest and the second largest number from a set of n distinct numbers can be
found in
{
=O(n).
~O(2n).
~O(nxn).
~O(logn).
}
One can determine whether a Binary tree is a Binary Search Tree by traversing it in
{
~Preorder
=(B) Inorder
~Postorder
~Any of the three orders
}
What is the output of the following code
char symbol[3]={‘a’,‘b’,‘c’};
for (int index=0; index<3; index++)
cout << symbol [index];
{
~a b c
~“abc”
=abc
~‘abc’
}
If we create a file by ‘ifstream’, then the default mode of the file is _________
{
~ios :: out
=ios :: in
~ios :: binary
~ios :: app
}
You can read input that consists of multiple lines of text using
{
~the normal cout << combination.
~the cin.get( ) function with one argument.
=the cin.get( ) function with two arguments.
~the cin.get( ) function with three arguments.
}
this pointer
{
~implicitly points to an object.
~can be explicitly used in a class.
~can be used to return an object.
=All of the above.
}