Technology Questions

Q:

What do you mean by reference variable in c++?

Answer

A reference variable provides an alias to a previously defined variable.


Data type & reference-name = variable name

Report Error

View answer Workspace Report Error Discuss

Subject: C++
Job Role: Software Architect

0 5002
Q:

A special member function of a class, which is invoked automatically whenever an object goes out of the scope is called

A) Constructor B) Destructor
C) Friend function D) None of the above
 
Answer & Explanation Answer: B) Destructor

Explanation:

Destructor is a special member function of a class, which is invoked automatically whenever an object goes out of the scope. It has the same name as its class with a tilde character prefixed.

Report Error

View Answer Report Error Discuss

Filed Under: C++
Job Role: Software Architect

1 5001
Q:

What is the difference between realloc() and free()?

Answer

The free subroutine frees a block of memory previously allocated by the malloc subroutine. Undefined results occur if the Pointer parameter is not a valid pointer. If the Pointer parameter is a null value, no action will occur. The realloc subroutine changes the size of the block of memory pointed to by the Pointer parameter to the number of bytes specified by the Size parameter and returns a new pointer to the block. The pointer specified by the Pointer parameter must have been created with the malloc, calloc, or realloc subroutines and not been deallocated with the free or realloc subroutines. Undefined results occur if the Pointer parameter is not a valid pointer.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 4995
Q:

What will happen when an exception is not processed?

A) It will eat up lot of memory and program size B) Terminate the program
C) Crash the compiler D) None of the mentioned
 
Answer & Explanation Answer: A) It will eat up lot of memory and program size

Explanation:

As in the case of not using an exception, it will remain useless in the program and increase the code complexity.

Report Error

View Answer Report Error Discuss

Filed Under: C++

2 4982
Q:

How will you call the return code of JCL ?

Answer

Return Code in JCL can b obtained by the use of COND paramater...it is used to know the return codes of previous steps.

Report Error

View answer Workspace Report Error Discuss

2 4982
Q:

Difference between Stack and Queue

Answer

Stack is a collection of objects that works in LIFO (Last in First out) mechanism while Queue is FIFO (First in First out). This means that the object that is inserted first is removed last in a stack while an object that is inserted first is removed first in a queue.

Report Error

View answer Workspace Report Error Discuss

Subject: C++

0 4947
Q:

Can SQL Servers linked to other servers like Oracle?

Answer

SQL Server can be linked to any server provided it has OLE-DB provider from Microsoft to allow a link. E.g. Oracle has an OLE-DB provider for oracle that Microsoft provides to add it as linked server to SQL Server group.

Report Error

View answer Workspace Report Error Discuss

Subject: SQL

0 4923
Q:

Which among the following are not the c++ tokens

A) Identifiers B) keywords
C) Strings D) None
 
Answer & Explanation Answer: D) None

Explanation:

All the above listed options are c++ tokens .They  include:

             - keywords

             - Identifiers

             - Constants

             - Strings

             - operators

Report Error

View Answer Report Error Discuss

Filed Under: C++
Exam Prep: GATE

4 4918