Você está na página 1de 6

1.

Polymorphism
In object-oriented programming, polymorphism (from the Greek meaning "having multiple
forms") is the characteristic of being able to assign a different meaning or usage to
something in different contexts - specifically, to allow an entity such as a variable, a function,
or an object to have more than one form. There are several different kinds of polymorphism.
Method Overloading: In Java, it is possible to define two or more methods of same name in
a class, provided that there argument list or parameters are different. This concept is known
as Method Overloading.
Method Overriding: Child class has the same method as of base class. In such cases child
class overrides the parent class method without even touching the source code of the base
class. This feature is known as method overriding.
2. Inheritance: In object-oriented programming, inheritance is the concept that when a class of
objects is defined, any subclass that is defined can inherit the definitions of one or more
general classes. This means for the programmer that an object in a subclass need not carry
its own definition of data and methods that are generic to the class (or classes) of which it is
a part. This not only speeds up program development; it also ensures an inherent validity to
the defined subclass object (what works and is consistent about the class will also work for
the subclass).
3. Socket: Sockets allow communication between two different processes on the same or
different machines.
A socket is one endpoint of a two-way communication link between two programs
running on the network. A socket is bound to a port number so that the TCP layer
can identify the application that data is destined to be sent to.
4. Provide an algorithm to reverse a linked list without using recursion.

5. Differentiate between C and C++.


C was developed by Dennis Ritchie between 1969 and 1973 at AT&T Bell Labs.
C++ was developed by Bjarne Stroustrup in 1979 with C++'s predecessor "C with
Classes".
When compared to C++, C is a subset of C++.
C++ is a superset of C. C++ can run most of C code while C cannot run C++ code.
C supports procedural programming paradigm for code development.
C++ supports both procedural and object oriented programming paradigms;
therefore C++ is also called a hybrid language.
C does not support object oriented programming; therefore it has no support for
polymorphism, encapsulation, and inheritance.
Being an object oriented programming language C++ supports polymorphism,
encapsulation, and inheritance.
In C (because it is a procedural programming language), data and functions are
separate and free entities.
In C++ (when it is used as object oriented programming language), data and
functions are encapsulated together in form of an object. For creating objects class
provides a blueprint of structure of the object.
In C, data are free entities and can be manipulated by outside code. This is because C
does not support information hiding.
In C++, Encapsulation hides the data to ensure that data structures and operators are
used as intended.
C, being a procedural programming, it is a function driven language.
While, C++, being an object oriented programming, it is an object driven language.
C does not support function and operator overloading.
C++ supports both function and operator overloading.
C does not allow functions to be defined inside structures.
In C++, functions can be used inside a structure.
C does not have namespace feature.
C++ uses NAMESPACE which avoid name collisions.
A namespace is a declarative region that provides a scope to the identifiers (the
names of types, functions, variables, etc.) inside it. Namespaces are used to organize
code into logical groups and to prevent name collisions that can occur especially
when your code base includes multiple libraries. All identifiers at namespace scope
are visible to one another without qualification. Identifiers outside the namespace
can access the members by using the fully qualified name for each identifier.
C uses functions for input/output. For example scanf and printf.
C++ uses objects for input output. For example, cin and cout.
C does not support reference variables.
C++ supports reference variables.
C has no support for virtual and friend functions.
C++ supports virtual and friend functions.
C provides malloc () and calloc () functions for dynamic memory allocation, and free
() for memory de-allocation.
C++ provides new operator for memory allocation and delete operator for memory
de-allocation.
6. What is the usage of transponders?
A transponder is a wireless communications, monitoring, or control device that picks
up and automatically responds to an incoming signal. The term is a contraction of
the words transmitter and responder. Transponders can be either passive or active.
7. What are the different memories you know about?
The types of memory in a computer system are:
Cache Memory - This is a small amounts of memory used to speed up system
performance.
Main memory - This is the RAM (random access memory)
Secondary memory - This is a magnetic storage that keeps applications and data
available to be used, and may also serves as virtual memory depending upon the
operating system.
DRAM Dynamic Random Access Memory: It holds data for short time period and
will be refreshed periodically.
SDRAM - Static RAM Holds data and refreshing does not required. It is faster than
DRAM.
Flash Memory: A non-volatile, rewritable and solid state memory which performs
the functions of both RAM and hard disk combined. Data is retained in the memory,
in case of power loss. It is ideal for printers, cellular phones, digital cameras, pagers.
8. Which of them takes the shortest access time?
Cache memory
9. What are the different replacement policies?
10. Define Zombie process. How is it different from orphan process?

11. What is a semaphore? What are the different types of semaphores?


Semaphores are typically used in one of two ways:
To control access to a shared device between tasks. A printer is a good example. You
don't want 2 tasks sending to the printer at once, so you create a binary semaphore
to control printer access. When a device wishes to print, it attempts to "take" the
semaphore. If the semaphore is available, the task gets to print. If the semaphore is
not available, the task will have to wait for the printer.
Task synchronization. By tasks taking and giving the same semaphore, you can force
them to perform operations in a desired order.
Counting semaphores are used when you might have multiple devices (like 3
printers or multiple memory buffers).
Binary semaphores are used to gain exclusive access to a single resource (like the
serial port, a non-re-entrant library routine, or a hard disk drive). A counting
semaphore that has a maximum value of 1 is equivalent to a binary semaphore
(because the semaphore's value can only be 0 or 1).
Mutex semaphores are optimized for use in controlling mutually exclusive access to
a resource. There are several implementations of this type of semaphore.
12. Define a good platform along with its qualities.

13. Define red-black trees.

14. What is the procedure to insert into a sorted array?

15. What are pointers in C? Give an example where to illustrate their significance.
A pointer is a variable whose value is the address of another variable, i.e., direct address of
the memory location.
uses of pointers:
1. to access array elements
2. Pointers use in dynamic memory allocation linked lists, trees, graphs.
3. Passing data in & out of without coping.
4. Create and manage your own data types.
16. What is HTTP? Give some of its methods.
The Hypertext Transfer Protocol (HTTP) is an application-level protocol for distributed,
collaborative, hypermedia information systems. The primary or most-commonly-used HTTP
verbs (or methods, as they are properly called) are POST, GET, PUT, PATCH, and DELETE.
These correspond to create, read, update, and delete (or CRUD) operations, respectively.
GET-The GET method is used to retrieve information from the given server using a
given URI. Requests using GET should only retrieve data and should have no other
effect on the data.
HEAD-Same as GET, but transfers the status line and header section only.
POST-A POST request is used to send data to the server, for example, customer
information, file upload, etc. using HTML forms.
PUT-Replaces all current representations of the target resource with the uploaded
content.
DELETE-Removes all current representations of the target resource given by a URI.
CONNECT-Establishes a tunnel to the server identified by a given URI.
OPTIONS-Describes the communication options for the target resource.
TRACE-Performs a message loop-back test along the path to the target resource.
17. Briefly describe a B+ tree. What is bulk loading in it?

18. What are literals in C++?

19. Describe the merge sort principle and what will be its time complexity?

20. What happens when a thrown exception is not handled?

21. What is a web server? What are the load limits in it?

22. Devise a program to sort an array using bubble sort.

23. What is piggy backing?

24. Given an array of integers, devise a program to replace every element with the next greatest
element on the right side in the array. Also, replace the last element with 5 as there no
element on the right side of it.

25. What is garbage collection in Java?

26. Describe different types of networks.

27. Differentiate between calloc and malloc.


The malloc() takes a single argument, while calloc() takess two.
Second, malloc() does not initialize the memory allocated, while calloc() initializes the
allocated memory to ZERO.
Both malloc and calloc are used in C language for dynamic memory allocation they obtain
blocks of memory dynamically.
28. What is difference between UNIX and Linux?

29. Differentiate between RAM and ROM.

30. What is normalization? Describe its different types.

31. How would you use user_contraints table in DB?

32. What is meant by JVM? Is JVM platform independent or not?

33. What is the usage of OLE?

34. Write a program to know whether the input number is an Armstrong number.

35. Explain the concepts involved in Object Oriented programming.

36. Define data warehousing.

37. How will you sort the elements of array in descending order?

38. Write a program to reverse a string.

39. Differentiate between static and dynamic modelling.

40. What do you mean by DOM?


41. What are http and its uses?
HTTP means Hyper Text Transfer Protocol. HTTP is the underlying protocol used by the World
Wide Web and this protocol defines how messages are formatted and transmitted, and what
actions Web servers and browsers should take in response to various commands.

Você também pode gostar