[Updated] Goldman Sachs Aptitude Test Questions and Answers
Practice List of TCS Digital Coding Questions !!!
Take 50+ FREE!! Online Data Interpretation Mock test to crack any Exams.

Technical Interview Questions and Answers :: Virtusa

206.21K

Tot. Mock Test: 3


Total Qs: 221+

  •  Select All
  •  SQL
  •  C++
  •  .NET
  •  Oracle PLSQL
  •  Informatica
  •  WebMethod
  •  DBMS
  •  Soft. Engineering
  •  Data Structure
  •  Networking
  •  C
  •  Operating System
  •  HR Question in TR
  •  Java

    101 / 221

    What is the difference between declaration and definition?
    Answer:

    In C , function declaration is means telling the compiler that a function occurs but there's no definition given to it. When in the program, the function with definition is given, it's known as function definition.



    For eg.: void display();//function declaration



    void display){ cout<<"Function Definition";}//Function Definition

    Please Login First :

    102 / 221

    How can we access private members of a classs?
    Answer:

    By using a friend function.
    A friend function has access to all private and protected members of the class for which it is a friend.

    Please Login First :

    103 / 221

    What are the differences between C and C++?
    Answer:

    1. C can run most of the code of C, but C can't run C code.



    2. C supports procedural programming paradigm whereas C supports both procedural and object oriented programming paradigm.



    3. C is a function driven and C is an object driven language.



    4. C doesn't allow function definitions within structures whereas in C function definition can be within structures.



    5. C doesn't support reference variables but C does support. 

    Please Login First :

    104 / 221

    What are the major Differences between JAVA and C++ ?
    Answer:

    1. C supports pointers, Java doesn't.



    2. Multiple inheritence is supported in C but not in Java.



    3. Java has built-in support for threads whereas C doesn't have built-in support for threads.



    4. No destructors in Java but C has them.



    5. C supports both method and operator overloading, Java only supports method overloading.

    Please Login First :

    105 / 221

    What are the difference between an object and a class?
    Answer:

    Classes are user defined data types and behave like the built-in type of a programming language. The wrapping up of data and functions into a single unit called class.
    Objects are the basic run-time entities in an object-oriented system. When a program is executed, the objects interact by sending messages to one another.

    Please Login First :

    106 / 221

    What do you mean by binding of data and functions?
    Answer:

    Binding refers to the process used for converting variables and functions into machine language addresses. Basically this means linking the adresses of the two either during compile time or runtime(Static and Dynamic Binding).

    Please Login First :

    107 / 221

    Can we implement all the concepts of OOPS using the keyword struct?
    Answer:

    Yes, struct is similar to class, only all attributes/methods are public by default in the struct. You can very well have methods and attributes in a struct. You can also inherit from a struct (default inheritance is public).

    Please Login First :

    108 / 221

    What is the difference between class and structure?
    Answer:

    1. Members of a class are private by default and members of struct are public by default.


    2. 'struct' is the keyword for Structure and 'class' is the keyword for Class.


    3. Structure is used for smaller amount of data and Class is used for larger amount of data.


    4. Structure is usually as for grouping of data and Class is for inheritence and further abstraction.


     

    Please Login First :

    109 / 221

    Can we create an empty class? If so what would be the sizeof such object.
    Answer:

    Yes, Size of an empty class is not zero. It is 1 byte generally. It is nonzero to ensure that the two different objects will have different addresses.

    Please Login First :

    110 / 221

    What are the role of protected access specifier?
    Answer:

    Protected access specifier makes the method accessible only by the derived class.

    Please Login First :


Most Frequent Qs.