Home
Current Affairs January 2024

What is the correct answer?

4

What does STL stand for?

A. Simple Template Library

B. Standard Template Library

C. Static Type Library

D. Single Type-based Library

Correct Answer :

A. Simple Template Library


Related Questions

What is the correct answer?

4

p++ executes faster than p + 1.

A. True

B. False

What is the correct answer?

4

enum helps to create user defined datatype.

A. True

B. False

What is the correct answer?

4

struct stud
{
int roll;
char name[20];
float marks;
} *p;
What will be the byte size of p?

A. 24

B. 2

C. 26

D. None

What is the correct answer?

4

Which one of the following is not a fundamental data type in C++

A. float

B. string

C. int

D. wchar_t

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

continue statement is used

A. to go to the next iteration in a loop

B. come out of a loop

C. exit and return to the main function

D. restarts iterations from beginning of loop

What is the correct answer?

4

Operation between an integer and float always yields a float result.

A. True

B. False

What is the correct answer?

4

Which of the STL containers store the elements contiguously (in adjecent memory locations)?

A. std::vector

B. std::list

C. std::map

D. std::set

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);
}

A. Hello

B. World

C. Compilation error

D. Hello World

What is the correct answer?

4

What will be output if you will compile and execute the following c code?
#include 
int main()
{
float a=5.2;
if(a==5.2)
printf("Equal");
else if(a<5.2)
printf("Less than");
else
printf("Greater than");
return 0;
}

A. Less than

B. Equal

C.

Greater than

D. None of above

What is the correct answer?

4

The output of the following code is:
main() 
{
int a[10], i;
for (i = 1; I <= 0; i++)
{
scanf("%d", a[i]);
printf("%d", a[i]);
}
}

A. 10

B. Logical error

C. Runtime error

D. 1 to 10 will be displayed

What is the correct answer?

4

Which of the following is not a standard exception built in C++.

A. std::bad_creat

B. std::bad_alloc

C. std::bad_cast

D. std::bad_typeid

What is the correct answer?

4

the value *(&i) is same as printing the value of address of i.

A. True

B. False

What is the correct answer?

4

The expression "b = 3 ^ 2;" will evaluate b = 9.

A. True

B. False

What is the correct answer?

4

If the class name is X, what is the type of its “this” pointer (in a nonstatic, non-const member function)?

A. const X* const

B. X* const

C. X*

D. X&

What is the correct answer?

4

The expression "int i = j = k = 0;" is invalid.

A. True

B. False

What is the correct answer?

4

Right shifting an operand 1bit is equivalent to multiplying it by 2.

A. True

B. False

What is the correct answer?

4

printf("%d", sizeof('2')); will print 2.

A. True

B. False

What is the correct answer?

4

The output of the following code is:
main() 
{
int k, num = 30;
k = (num > 5 ? (num <= 10 ? 100 : 200) : 500);
printf("
%d", num);
}

A. 200

B. 500

C. 30

D. Unpredictable

What is the correct answer?

4

The output of the following code is:
void main() 
{
static int a = 1, b, c;
if (a>=2) b=2; c=3;
printf("%d\t%d", b,c);
}

A. 2 3

B. 0 3

C. 0 0

D. 2 0

What is the correct answer?

4

Which classes allow primitive types to be accessed as objects?

A. Storage

B. Virtual

C. Friend

D. Wrapper

What is the correct answer?

4

There are total ------ numbers of operators in 'C'.

A. 35

B. 45

C. 55

D. 40

What is the correct answer?

4

The main() function can be called from any other function.

A. True

B. False

What is the correct answer?

4

fopen() function returns a pointer to the open file.

A. True

B. False

What is the correct answer?

4

Identify the wrong statement

A. putchar(65)

B. putchar('x')

C. putchar("x")

D. putchar('
')

What is the correct answer?

4

All elements of a structure are allocated contiguous memory locations.

A. True

B. False

What is the correct answer?

4

printf() is not a library function.

A. True

B. False

What is the correct answer?

4

What will be output if you will compile and execute the following c code?


#include 
int main(){
char c=125;
c=c+10;
printf("%d",c);
return 0;
}

 

A. 135

B. +INF

C. -121

D. -135

What is the correct answer?

4

What does STL stand for?

A. Simple Template Library

B. Standard Template Library

C. Static Type Library

D. Single Type-based Library

What is the correct answer?

4

Nested macros are allowed.

A. True

B. False