Related Questions
What is the correct answer?
4
When is std::bad_alloc exception thrown?
A. When new operator cannot allocate memory
B. When alloc function fails
C. When type requested for new operation is considered bad< thisexception is thrown
D. When delete operator cannot delete teh allocated (corrupted) object
What is the correct answer?
4
Which classes allow primitive types to be accessed as objects?
What is the correct answer?
4
Bitwise operators can operate upon?
What is the correct answer?
4
gets() and puts() are unformatted I/O functions.
What is the correct answer?
4
Which one of the following is not a fundamental data type in C++
What is the correct answer?
4
Which of the following expressions is wrong
What is the correct answer?
4
The contents of a file opened in 'r+' mode cannot be changed.
What is the correct answer?
4
# define PI = 8;' is the correct declaration of macros.
What is the correct answer?
4
emp name' is a valid variable name.
What is the correct answer?
4
The -------------------------- loop executes at least once.
What is the correct answer?
4
The function fopen() on failure returns---------------------.
What is the correct answer?
4
unsigned' is a valid variable name.
What is the correct answer?
4
What is an array?
A. An array is a collection of variables that are of the dissimilar data type.
B. An array is a collection of variables that are of the same data type.
C. An array is not a collection of variables that are of the same data type.
What is the correct answer?
4
The output of the following code is:
void main()
{
int z, a = 5, b = 3; z = a * 2 + 26 % 3;
printf("%d", z); }
What is the correct answer?
4
printf("%d", sizeof('2')); will print 2.
What is the correct answer?
4
The main() function can call itself recursively.
What is the correct answer?
4
Which of the following is not an infinite loop
A. int i =1;
while (1)
{i++;}
C. int true=0< false;
while (true)
{false = 1;}
D. int y, x = 0;
do
{y = x;}
while (x==0);
What is the correct answer?
4
Which of the following is a valid destructor of the class name "Country"
C. int ~Country(Country obj)
What is the correct answer?
4
------ is the ternary operator
What is the correct answer?
4
Operation between an integer and float always yields a float result.
What is the correct answer?
4
Which one of the following is not a valid reserved keyword in C++
What is the correct answer?
4
The statement "for (i = 0, j = 2; j <= 10; j++)" is a valid statement in 'C'.
What is the correct answer?
4
An array elements are always stored in _________ memory locations.
What is the correct answer?
4
Which of the STL containers store the elements contiguously (in adjecent memory locations)?
What is the correct answer?
4
struct stud
{
int roll;
char name[20];
float marks;
} *p;
What will be the byte size of p?
What is the correct answer?
4
The expression (i + j)++ is illegal.
What is the correct answer?
4
static variable will not always have assigned value.
What is the correct answer?
4
The output of the following code is:
void change (char *k)
{
k="Hello";
return;
}
main()
{
char *ch = "World";;
change(ch);
printf("%s", ch);
}
What is the correct answer?
4
Which of the following is the most preferred way of throwing and handling exceptions?
A. Throw by value and catch by reference.
B. Throw by reference and catch by reference.
C. Throw by value and catch by value
D. Throw the pointer value and provide catch for teh pointer type.
What is the correct answer?
4
A recursive function calls itself again and again.