April 23, 2019

Srikaanth

Adobe Systems C++ Interview Questions Answers

How Do I Declare An Array Of N Pointers To Functions Returning Pointers To Functions Returning Pointers To Characters?

If you want the code to be even slightly readable, you will use typedefs.

typedef char* (*functiontype_one)(void);
typedef functiontypeone (*functiontype_two)(void);
functiontype_two myarray[N]; //assuming N is a const integral

What Is The Auto Keyword Good For In C++?

Local variables occur within a scope; they are "local" to a function. They are often called automatic variables because they automatically come into being when the scope is entered and automatically go away when the scope closes. The keyword auto makes this explicit, but local variables default to auto auto auto auto so it is never necessary to declare something as an auto auto auto auto.

What Is The Difference Between Char A[] = "string"; And Char *p = "string";?

In the first case 6 bytes are allocated to the variable a which is fixed, where as in the second case if *p is assigned to some other value the allocate memory can change.

What Can I Safely Assume About The Initial Values Of Variables Which Are Not Explicitly Initialized?

It depends on complier which may assign any garbage value to a variable if it is not initialized.

What Does Extern Mean In A Function Declaration?

Using extern in a function declaration we can make a function such that it can used outside the file in which it is defined.

An extern variable, function definition, or declaration also makes the described variable or function usable by the succeeding part of the current source file. This declaration does not replace the definition. The declaration is used to describe the variable that is externally defined.

If a declaration for an identifier already exists at file scope, any extern declaration of the same identifier found within a block refers to that same object. If no other declaration for the identifier exists at file scope, the identifier has external linkage.

What Is The Best Way To Declare And Define Global Variables?

The best way to declare global variables is to declare them after including all the files so that it can be used in all the functions.
Adobe Systems Most Frequently Asked Latest C++ Interview Questions Answers
Adobe Systems Most Frequently Asked Latest C++ Interview Questions Answers

How Do You Decide Which Integer Type To Use?

It depends on our requirement. When we are required an integer to be stored in 1 byte (means less than or equal to 255) we use short int, for 2 bytes we use int, for 8 bytes we use long int.

A char is for 1-byte integers, a short is for 2-byte integers, an int is generally a 2-byte or 4-byte integer (though not necessarily), a long is a 4-byte integer, and a long long is a 8-byte integer.

Anything Wrong With This Code?

t*p = 0;
Delete P;


Yes, the program will crash in an attempt to delete a null pointer.

Anything Wrong With This Code?

t *p = Newt[10];
Delete P;


Everything is correct, Only the first element of the array will be deleted", The entire array will be deleted, but only the first element destructor will be called.

What Problems Might The Following Macro Bring To The Application?

#define sq(x) x*x

What Is An Html Tag?

An HTML tag is a syntactical construct in the HTML language that abbreviates specific instructions to be executed when the HTML script is loaded into a Web browser. It is like a method in Java, a function in C++, a procedure in Pascal, or a subroutine in FORTRAN.

Why Are Arrays Usually Processed With For Loop?

The real power of arrays comes from their facility of using an index variable to traverse the array, accessing each element with the same expression a[i]. All the is needed to make this work is a iterated statement in which the variable i serves as a counter, incrementing from 0 to a. length -1. That is exactly what a loop does.

What Is Polymorphism In C++? Explain With An Example?

"Poly" means "many" and "morph" means "form". Polymorphism is the ability of an object (or reference) to assume (be replaced by) or become many different forms of object. Example: function overloading, function overriding, virtual functions. Another example can be a plus '+' sign, used for adding two integers or for using it to concatenate two strings.

What Do You Mean By Pure Virtual Functions?

A pure virtual member function is a member function that the base class forces derived classes to provide. Normally these member functions have no implementation. Pure virtual functions are equated to zero.

class Shape
{
public: virtual void draw() = 0;
};

What Is A Scope Resolution Operator?

A scope resolution operator (::), can be used to define the member functions of a class outside the class.

What Is The Difference Between An External Iterator And An Internal Iterator? Describe An Advantage Of An External Iterator?

An internal iterator is implemented with member functions of the class that has items to step through. .An external iterator is implemented as a separate class that can be "attach" to the object that has items to step through. .An external iterator has the advantage that many difference iterators can be active simultaneously on the same object.

What Are Virtual Functions In C++?

A virtual function allows derived classes to replace the implementation provided by the base class. The compiler makes sure the replacement is always called whenever the object in question is actually of the derived class, even if the object is accessed by a base pointer rather than a derived pointer. This allows algorithms in the base class to be replaced in the derived class, even if users don't know about the derived class.

What Is Abstraction In C++?

Abstraction is of the process of hiding unwanted details from the user.

Which Recursive Sorting Technique Always Makes Recursive Calls To Sort Subarrays That Are About Half Size Of The Original Array?

Mergesort always makes recursive calls to sort subarrays that are about half size of the original array, resulting in 0(n log n) time.

What Is Friend Function In C++?

As the name suggests, the function acts as a friend to a class. As a friend of a class, it can access its private and protected members. A friend function is not a member of the class. But it must be listed in the class definition.

What Is A C++ Class?

Class is a user-defined data type in C++. It can be created to solve a particular kind of problem. After creation the user need not know the specifics of the working of a class.

Suppose That Data Is An Array Of 1000 Integers. Write A Single Function Call That Will Sort The 100 Elements Data [222] Through Data [321]?

quicksort((data + 222),100);

What Is The Difference Between An Object And A Class?

Classes and objects are separate but related concepts. Every object belongs to a class and every class contains one or more related objects.

A Class is static. All of the attributes of a class are fixed before, during, and after the execution of a program. The attributes of a class don't change.
The class to which an object belongs is also (usually) static. If a particular object belongs to a certain class at the time that it is created then it almost certainly will still belong to that class right up until the time that it is destroyed.
 An Object on the other hand has a limited lifespan. Objects are created and eventually destroyed. Also during that lifetime, the attributes of the object may undergo significant change.

What Are 2 Ways Of Exporting A Function From A Dll?

1 .Taking a reference to the function from the DLL instance.
2. Using the DLL 's Type Library.

What Do You Mean By Binding Of Data And Functions?

Encapsulation.

What Is The Word You Will Use When Defining A Function In Base Class To Allow This Function To Be A Polimorphic Function?

virtual.

What Is Virtual Class And Friend Class?

Friend classes are used when two or more classes are designed to work together and need access to each other's implementation in ways that the rest of the world shouldn't be allowed to have. In other words, they help keep private things private. For instance, it may be desirable for class DatabaseCursor to have more privilege to the internals of class Database than main() has.

What Is Boyce Codd Normal Form In C++?

A relation schema R is in BCNF with respect to a set F of functional dependencies if for all functional dependencies in F+ of the form a-> , where a and b is a subset of R, at least one of the following holds

a- > b is a trivial functional dependency (b is a subset of a).
a is a superkey for schema R.

Subscribe to get more Posts :