Documentos de Académico
Documentos de Profesional
Documentos de Cultura
An object is a combination of messages and data. Objects can receive and send messages and use
messages to interact with each other. The messages contain information that is to be passed to the
recipient object.
The design phase is followed by OOP, which is the implementation phase. OOP provides specifications
for writing programs in a programming language. During the implementation phase, programming is
done as per the requirements gathered during the analysis and design phases.
In the design phase, the developers of the system document their understanding of the system.
Design generates the blue print of the system that is to be implemented. The first step in creating an
object oriented design is the identification of classes and their relationships.
Class describes the nature of a particular thing. Structure and modularity is provided by a Class in
object oriented programming environment. Characteristics of the class should be understandable by
an ordinary non programmer and it should also convey the meaning of the problem statement to him.
Class acts like a blue print.
!
Inheritance revolves around the concept of inheriting knowledge and class attributes from the parent
class. In general sense a sub class tries to acquire characteristics from a parent class and they can
also have their own characteristics. Inheritance forms an important concept in object oriented
programming.
c Ô
classes. A sub class can have characteristics from multiple parents and still can have its own
characteristics.
p
$
Composition helps to simplify a complex problem into an easier problem. It makes different classes
and objects to interact with each other thus making the problem to be solved automatically. It
interacts with the problem by making different classes and objects to send a message to each other.
p
%
Polymorphism helps a sub class to behave like a parent class. When an object belonging to different
data types respond to methods which have a same name, the only condition being that those methods
should perform different function.
p '
There are several programming languages which are implementing OOP because of its close proximity
to solve real life problems. Languages such as Python, Ruby, Ruby on rails, Perl, PHP, Coldfusion, etc
use OOP. Still many languages prefer to use DOM based languages due to the ease in coding.
---------
p
Object oriented programming language allows concepts such as modularity, encapsulation,
polymorphism and inheritance. Simula is credited to be the first object oriented language. Objects are
c ë
said to be the most important part of object oriented language. Concept revolves around making
simulation programs around an object.
)*+
UML or unified modeling language is regarded to implement complete specifications and features of
object oriented language. Abstract design can be implemented in object oriented programming
languages. It lacks implementation of polymorphism on message arguments which is a OOPs feature.
$
Languages which are called as object oriented almost implement everything in them as objects such
as punctuations, characters, prototypes, classes, modules, blocks, etc. They were designed to
facilitate and implement object oriented methods.
'
$%
&
These are some of the problems faced by the developer using object oriented language they are: -
1) Object oriented uses design patterns which can be referred to as anything in general.
2) Repeatable solution to a problem can cause concern and disagreements and it is one of the major
problems in software design.
! ,
$
&
$
Some of the advantages of object oriented programming are as follows: -
1) A clear modular structure can be obtained which can be used as a prototype and it will not reveal
the mechanism behind the design. It does have a clear interface.
2) Ease of maintenance and modification to the existing objects can be done with ease.
3) A good framework is provided which facilitates in creating rich GUI applications.
c 0
p#
Object oriented programming and relational database programming are almost similar in software
engineering. RDBMS will not store objects directly and that¶s where object oriented programming
comes into play. Object relational mapping is one such solution.
pp
In Object oriented programming usage of class often occurs. A class defines the characteristics of an
object and its behaviors. This defines the nature and functioning of a specified object to which it is
assigned. Code for a class should be encapsulated.
p
$
Encapsulation specifies the different classes which can use the members of an object. The main goal
of encapsulation is to provide an interface to clients which decrease the dependency on those features
and parts which are likely to change in future. This facilitates easy changes to the code and features.
p
A method will affect only a particular object to which it is specified. Methods are verbs meaning they
define actions which a particular object will perform. It also defines various other characteristics of a
particular object.
p (
$$ .
There are three patterns of design out of which Creational patterns play an important role the various
patterns described underneath this are: -
1) Factory pattern
2) Single ton pattern
3) Prototype pattern
4) Abstract factory pattern
5) Builder pattern
p
%
The anlaysis or the object oriented analysis phase considers the system as a solution to a problem in
its environment or domain. Developer concentrates on obtaining as much information as possible
about the problem. Critical requirements needs to be identified.
c u
£ Interview Questions
p .
$$ &//0(,1//
Visual C++ deals with graphical user interface and is the most advanced IDE for creating complex
applications. This is used to create real time applications.
ANSI C++ is the updated and advanced version than the earlier versions of C++. Libraries and
functions are updated in ANSI C++ compared to the earlier versions.
,
$$
$
..//
The main difference between the structure of C and C++ is, C struct can contain only data and C++
has access limitations and contains functions such as public, private, etc.
Rational class contains two data members, numerator and denominator and seven method members,
reduce, add, multiply, divide, equal, print, and set rational. The methods in the class Rational explicitly
mention only one. This is because the class object for which they are invoked is an implicit parameter
for each routine.
c
virtual functions tables.
p#
.//
The main difficulty to parse a C++ code lies in the complex definitions of C++ identifiers. They should
also satisfy complex scoping rules for C++. Also they should define what type it is and to what type it
belongs to. It should also satisfy the basic criteria of parsing source code.
p
This function is used for exceptional circumstances and this is made possible by handlers. This
exception handler is placed in the code which throws exception and error. This exception throws error
when the condition is not satisfied. This handler is placed in a try block in which throw function is
present. After the try block a catch function is placed through which exception handlers are declared.
p
4
Static cast is very helpful for conversions from pointers to related class and also from derived class to
base class. This static_cast is also helpful to convert base class to derived class. Static_cast makes
sure that atleast classes and objects are completed. This has its disadvantages such as programmer
should ensure that the object specified is being moved to its destination.
p
4
Reinterpret_cast is platform specific. The code generated for reinterpret_cast is generated for the
platform which makes it not useful for inter operability. This transfers pointers, irrespective of classes.
This forms a image of the specific class and also pointer pointed or the pointer itself is not checked.
This can lead doors to security lapses.
p!
This string stream class is defined by a standard header file . This class provides flexibility in
converting a string based object to stream. This is useful in extraction and insertion of numerical,
strings, characters, etc. This is useful to extract a specific numerical from a string. This also aids in
insertion.
p" '
% $
.//
A data structure is a collection of data elements under one name. These data elements are collectively
c Ñ
known as members and they can have variable lengths and types. Structure_name and object_name
are two important types defined in C++. Structure types are defined by structure_name and
object_name contains valid identifiers.
£ Interview Questions
p (
$
%6.7
The four basic data types in ³c´ language are as follows
(i) Char
(ii) Int
(iii) Float
(iv) Double
'
$&$
%
If the int variable is created by default as a µlong¶ type it typically will have a possible range of values
from a maximum of +214748347 and a minimum of -2147483648. For µshort¶ type these are the
maximum and minimum values +327676 and minimum -32768.
(While answering this question you can specify the approximate value raised to power).
'
%9&
:;9
&:9
&:
The extent to which a variable is accessible in a program is called the µvariable scope¶.
Variables declared internally inside a function are known as µlocal¶ variables.
Variables declared externally outside a function are known as µglobal¶ variables.
'
&
When an int variable is declared it can by default contain either positive of negative integer values.
These are known as µsigned¶ values. The range of positive values is determined by your system.
c ÿ
of text. Each element in an array of the char data type can store a single character. Adding the special
null character escape sequence in the arrays final element promotes the array to string. It can be
referenced using the array name and can be displayed using the %s format specifier.
" '
$
$
The enum keyword provides a handy way to create a sequence of integer constants in a concise
manner. Optionally the declaration can include a name for the sequence after the enum keyword. The
constant names follow with a comma and placed within braces. The name assigned can be used to call
the function again at later stage. The constants can be assigned any individual value but the following
constant will always increment it by one.
p#
A #if directive test can be offered with #else and #else if directives. This allows conditional branching
of the program to run sections of the code according to the result. Constants defined with a #define
directive can be undefined with the #undef directive. The #ifdef directive has a companion directive
#ifndef. These commands can be useful when debugging problem code to hide and unhide sections of
the program.
p '
Operator precedence defines the order in which C evaluates expressions.
e.g. in the expression a=6+b*3, the order of precedence determines whether the addition or the
multiplication is completed first. Operators on the same row have equal precedence.
p
$
8 8
This function concatenates the source string at the end of the target string. Strcmp() function
compares two strings to find out whether they are the same or different. The two strings are
compared character by character until there is a mismatch or end of one of the strings is reached,
whichever occurs first. If in case two strings are identical, a value of zero is returned. If there is no
matches between two strings then a difference of the two non matching values are returned according
to ASCII values.
p '
%
We use structures for different purposes which are
1) Construct individual arrays
E.g. 1) one array for storing names, another array for storing prices, and another for storing number
of pages.
2) Use a structure variable.
A structure contains a number of data types grouped together. These data types may or may not be of
the same type.
p ,
$$ 8 $8 =
The sprint() function works similar to the printf() function except for one small difference, instead of
sending the output to the screen as printf() does, this function writes the output to an array of
characters. Once str has been built, its contents can be displayed on the screen.
c
p $
$
$
8 ;$8 ;$ 8 $?8
Fopen(): - On opening a file, a pointer is set up which points to the first record in the file.
Fread(): - The pointer moves to the next record while reading a file. It always reads the file where the
pointer is pointed.
Fwrite(): -The pointer moves to the beginning of the next record on closing the file the pointer is
deactivated. This pointer writes the record where the pointer is currently places.
Fseek(): - Function lets us move the pointer from one record to another.
p! ,
$$ )
Both structures and unions are used to group a number of different variables together. But while a
structure enables us treat a number of different variables stored at different places in memory, a
union enables us to treat the same space in memory as a number of different variables.
p" '
$$ % ',4AB+0'1('
The different styles present in windows are WS_OVERLAPPED, WS_CAPTION, WS_THICKFRAME,
WS_MINIMIZEBOX, and WS_MAXIMIZEBOX.
All these macros are #defined in the µwindows.h¶ header file.
# '
$
Real constants are often called Floating point constants. The real constants could be written in two
forms fractional form and exponential form.
These are the following rules while constructing real constants
1) A real constant must have at least one digit
2) It must have a decimal point
3) It could be wither positive or negative
4) Default sign is positive
5) No commas or blanks are allowed within a real constant.
c p
%& %
$>
According to the information obtained from the National vulnerability database, PHP has more than
quarter of the software vulnerabilities discovered in 2008. Out of 33.33% software and scripts
vulnerability PHP amounts to almost quarter of them. Register_globals a feature present in PHP is
responsible for most of these vulnerabilities and now it is deprecated by PHP. Most of these security
vulnerabilities occur due to poor programming techniques.
%>
PHP stores information numerical in a platform dependent range. Unsigned integers can be easily
converted to signed integers. Decimal, octal, and hexadecimal notations can be easily assigned to
integers. Floating point notation and two forms of scientific notation can be easily assigned to Real
numbers. Zero is considered as false and all non zero numbers are considered as true.
>
In previous versions of PHP, object was fully copied before assigning a variable to a method. This
problem was solved in new versions of PHP by the handle function. Many of the features present in
PHP 5 are adopted from C++. Some of the features which are incorporated are restricted classes such
as private and public, abstract and final classes, abstract and final methods, constructors and
destructors with exception handling borrowed from C++.
'
>
PHP accelerator increases the speed of applications written in PHP. This boost of performance can be
around 2-10 times. PHP accelerator increases the speed of the applications by decreasing parsing each
and every time a PHP application runs. It depends upon factors such as time taken for execution of
the PHP script and the actual percentage of the source code requested.
C4D2&
$>
This GET variable is executed when a request is sent from the user for information. This GET gets
executed on the server and then information is sent back to the user. The information transmitted
through this GET variable is viewable by everyone and is displayed in the address bar of the browser.
A maximum of 100 characters is sent by the GET variable.
c pp
email or for other specific purpose.
PHP has efficient error and logging constants to its credit. Some of them are E_ERROR, E_NOTICE,
E_ALL, E_STRICT, etc.
pp
>
Looping is used to run the same script many number of times. Following statements are used in PHP
for looping while, do...while, for each, and for statement.
p '
& $
The basic control structures are if, for, while, do while, for each and switch. If you are planning to use
alternative structures then the closing braces should be changed to endif, endfor, endwhile,
endswitch, and endforeach. Similarly the opening brace of the alternative syntax should be changed to
(:) or colon. The alternative structure is applicable to else and elseif also.
p
>
Switch statement is executed line by line. PHP executes the statement only when the case statement
matches the value of the switch expression. It does execute the statement until the end of the block
till it finds the break statement. When the expression and statement matches themselves the code is
executed.
p '
$$ $ $
$ &
T filter a variable these are the following different functions used they are: -
1) Filter_var() 3) Filter_input
2) Filter_var_array() 4) Filter_input_array
c pÔ
p! '
%& 5
Validating and sanitizing are two different kinds of filters
Validating filters: - These filters are used to validate user sent information (input). Strict rules are
applied for formatting such as URL or Email validating. It also sends the success type for a particular
operation whether false or true.
Sanitizing filters: - These filters are used to allow or disallow specific characters present in a string.
There are no restrictions on data format rules. This filter always returns the string.
p
>
Personal home page language is used to create dynamic and interactive websites which are very
efficient in delivering client needs from the server side. This language is widely used. It is used on
various operating systems with Apache modules. This can be directly embedded into HTML code.
$>
)(1F%
PHP can be installed on UNIX in many different ways there are pre defined packages available which
can ease the process. Initially it can be controlled by the command line options. Help can be obtained
from./configure help command. After installing PHP modules or executables can be configures and
make command should help you in the process.
'
$$
&>
There are four different types of tags available in PHP they are
* PHP short tags
* ASP style tags.
Generally the first two tags are widely used because they are portable.
% 8
This function is very useful in PHP. This function compares array values in a user defined function and
it returns the array. If assoc() is added to the function it compares array keys. This function can also
be defined as array uintersect uassoc().
Resource holds reference to an external resource and it is a special variable. These are created and
used by specially defined functions. Resource holds defined and special handlers for opening files.
Converting to a resource makes no sense at all.
!
Null represents a variable with no value inside. There doesn¶t exist any value for type Null. Null is
defined to be null if and only if it is assigned a constant null, there is no value set, it is set to be
unset(). This is the case insensitive keyword. There are also two functions they are is_null and
unset().
c pë
functions are not only simple but also object methods which includes static methods.
pp
G
>
A Boolean type states a truth value whether it is true or false. These statements are case insensitive.
An operator returns a Boolean value and this value is passed onto the control structure which
executes the statement. If an argument is required it is automatically converted.
p
>
Type casting acts and functions similarly as it performs in C. The casts allowed are Integer, Boolean,
float and double, string, binary, array and object. Casting and support was added in PHP 5.2.1. A
variable can be enclosed in double quotes instead of casting it to a string.
p >
Principal password can be changed by using kadm5_chpass_principal command. If you also want to
specify the new password for effecting a change to the principal password it should be as
Bool kadm5_chpass_principal (resource $handle, string $principal, string password). This changes the
password to password.
p
&
$>
There are many advantages of PHP they are
1) Easy and fast creation of dynamic web pages and a developer can also embed these dynamic
functions into HTML.
2) A huge community resource which has a ton of information before you.
3) Connectivity ability lets you to connect to different interfaces and predefined libraries.
4) Execution is very fast because it uses less system resources, etc.
p
&
$
>
A huge advantage for PHP is its connective ability. It uses huge number of extensions to interface with
huge pool of libraries such as XML, graphics and encryption. Programmers can create their own
extensions and compiling them. They can load their own programs by using the dynamic loading
mechanism.
c p0
ASP.NET Interview Questions
p
0,3(2
Microsoft introduced the .Net framework with the intention of bridging the gap in interoperability
between applications. This framework aims at integrating various programming languages and
services. The .NET offers a complete suite for developing and deploying applications.
,
&
$ 3(2
It is designed to make significant improvements in code reuse, code specialization, resource
management, Multilanguage development, security, deployment and administration. There are lots
more features included in Microsoft .net which can be realized to a maximum potential with the
language support.
'
$
*
$ 3(2$
.Net products use eXtensible markup language (XML) for describing and exchanging data between
applications. It is a platform independent markup language. It allows computers to store data in a
format, which can be interpreted by any other computer system. XML can be used to transfer
structures data between heterogeneous systems.
.
B
The CLR is one of the most essential components of the .NET framework. CLR is the environment
where all programs using .NET technologies are executed. It provides services such as code
compilation, memory allocation, and garbage collection. It translates the code into Intermediate
language which helps interoperability of code.
!
.+,
CLS consists of a set of common rules followed by all the languages of the .NET framework. This set of
rules is known as Common language specifications. CLS enables an object or application to interact
with the objects or applications of other languages.
c pu
"
.2,
One of the specifications defined in CLS is common type system (CTs), which provides a type system
that is common across all languages. CTS define how data types are declared, used and managed in
the code at run time. The size of integer and long variables is the same across all CLs compliant
programming languages.
p#
$
3(2
When you compile a program in .NET, the conversion of source code to machine language happens in
two stages. In the first stage, the compiler translates code into an IL instead of machine language or
assembly language. In the second stage the conversion of IL to machine language is done at run time
by the JIt compiler.
pp
A managed heap is a region of the memory that is available for program execution. If sufficient
memory is not available on the managed heap, the garbage collection process is invoked. Whenever
you create an object, the CLR allocates memory for the object from the managed heap.
p
$ A
3(21
Elements present in Visual studio IDE are toolbars, solution explorer, code editor, output window, task
list window, and class view window. In addition to these elements start page and project properties
windows is also present.
p
.&
The class view window displays the classes, methods, and properties associated with a particular file.
They are displayed in a hierarchical tree-view depicting the containership of these items. When you
double-click any one of the items in the Class view window, it brings up the code editor window for
that item