Hibernate Interview Questions And Answers For Experienced

75 Hibernate Interview Questions And Answers For Experienced 2018. Here in this post coding compiler presenting a list of 75 advanced hibernate interview questions for freshers, 1 year experience, 2 years experience, 3 year experience, 4 year experience, 5 year experience.

Hibernate Interview Questions

Hibernate Interview Questions For Freshers

Question # 1 What is hibernate in java?

Answer #  Hibernate ORM (Hibernate in short) is an object-relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database. Hibernate also provides data query and retrieval facilities.

Question # 2 Is hibernate better than JDBC?

Answer # JDBC will always give better performance as compared to Hibernate for most of the database vendors. … The choice of hibernate over jdbc and sql queries is not because of the performance but because of reasons mainly object persistence and database independence in terms of not writing database specific queries.

Question # 3 Why do we need hibernate in Java?

Answer # So with JDBC, mapping between Java objects and database tables is done manually. Hibernate reduces lines of code by maintaining object-table mapping itself and returns result to application in form of Java objects. Hibernate, with Transparent Persistence, cache is set to application work space.

Question # 4 What is the use of ORM in Java?

Answer # ORM allows you to use java objects as representation of a relational database. It maps the two concepts (object-oriented and relational) Hibernate is an ORM framework – you describe how your objects are represented in your database, and hibernate handles the conversion.

Question # 5 What is the difference between JPA and Hibernate?

Answer # JPA is the interface, Hibernate is one implementation of that interface. JPA is a specification for accessing, persisting and managing the data between Java objects and the relational database. As the definition says its API, it is only the specification. Hibernate is a JPA provider.

Hibernate Interview Questions And Answers

Question # 6 What is the use of Session in hibernate?

Answer # The main runtime interface between a Java application and Hibernate. This is the central API class abstracting the notion of a persistence service. The lifecycle of a Session is bounded by the beginning and end of a logical transaction. (Long transactions might span several database transactions.)

Question # 7 What is the architecture of hibernate?

Answer # Hibernate makes use of the database and configuration data to provide persistence services (and persistent objects) to the application.

Question # 8 What is ORM hibernate?

Answer # Hibernate ORM (Hibernate in short) is an object-relational mapping tool for the Java programming language. It provides a framework for mapping an object-oriented domain model to a relational database.

Question # 9 Can we use only JPA without hibernate?

Answer # You have to specify the persistence provider(Hibernate,EclipseLink) in order to use the JPA implementation. The persistence providers have the implementaion classes for JPA specifications. You can’t just use JPA, cause it is an API =), but there are plenty JPA implementations: EclipseLink.

Question # 10 What are the fetching strategies supported by hibernate?

Answer # Fetch strategies can be declared in the O/R mapping metadata, or over-ridden by a particular HQL or Criteria query. Hibernate defines the following fetching strategies:

  1. Join fetching
  2. Select fetching
  3. Subselect fetching
  4. Batch fetching
  5. Immediate fetching
  6. Lazy collection fetching
  7. “Extra-lazy” collection fetching
  8. Proxy fetching
  9. “No-proxy” fetching
  10. Lazy attribute fetching

Hibernate Interview Questions For Experienced

Question # 11 What is a polymorphic association?

Answer # Polymorphic association is a term used in discussions of Object-Relational Mapping with respect to the problem of representing in the relational database domain, a relationship from one class to multiple classes. In statically typed languages such as Java these multiple classes are subclasses of the same superclass.

Question # 12 What is the difference between session and Sessionfactory in hibernate?

Answer # SessionFactory is Hibernate’s concept of a single datastore and is threadsafe so that many threads can access it concurrently and request for sessions and immutable cache of compiled mappings for a single database. Sessions are opened by a SessionFactory and then are closed when all work is complete.

Question # 13 What is the difference between load and get method in hibernate?

Answer # Session.load(): It will always return a “proxy” (Hibernate term) without hitting the database. In Hibernate, proxy is an object with the given identifier value, its properties are not initialized yet, it just look like a temporary fake object. If no row found , it will throws an ObjectNotFoundException.

Question # 14 Is hibernate Sessionfactory Singleton?

Answer # SessionFactory is also thread safe so only one thread can execute at a time its code. The instance of sessionFactory is heavyweighted because it contains connection, hibernate configuration, mapping files, location path so if you create number of instance of sessionFactory then your code becomes very heavy.

Question # 15 What are the configuration files in hibernate?

Answer # Hibernate also requires a set of configuration settings related to database and other related parameters. All such information is usually supplied as a standard Java properties file called hibernate.properties, or as an XML file named hibernate.cfg.xml.

Hibernate Interview Questions And Answers For Experienced

Questions # 16 What is the use of dialect in hibernate?

Answer # Dialect means “the variant of a language”. Hibernate, as we know, is database agnostic. It can work with different databases. However, databases have proprietary extensions/native SQL variations, and set/sub-set of SQL standard implementations. Therefore at some point hibernate has to use database specific SQL.

Question # 17 What is the use of Show_sql in hibernate?

Answer # Hibernate has build-in a function to enable the logging of all the generated SQL statements to the console. You can enable it by add a “show_sql” property in the Hibernate configuration file “ hibernate.cfg.xml “. This function is good for basic troubleshooting, and to see what’s Hibernate is doing behind.

Question # 18 What is hibernate proxy and how it helps in lazy loading?

Answer # A proxy is a subclass implemented at runtime. Hibernate creates a proxy (a subclass of the class being fetched) instead of querying the database directly, and this proxy will load the “real” object from the database whenever one of its methods is called.

Question # 19 Is session is thread safe in hibernate?

Answer # SessionFactory is Hibernates concept of a single datastore and is threadsafe so that many threads can access it concurrently and request for sessions and immutable cache of compiled mappings for a single database. Why to make session object thread safe if we already have a SessionFactory(immutable) object.

Hibernate Interview Questions And Answers For 2 Years Experience

Question # 20 What is the use of configuration in hibernate?

Answer # The org.hibernate.cfg.Configuration is used to build an immutable org.hibernate.SessionFactory . The mappings are compiled from various XML mapping files. A org.hibernate.cfg.Configuration also allows you to specify configuration properties.

Question # 21 What is criteria in hibernate?

Answer # In Hibernate, the Criteria API helps us build criteria query objects dynamically. Criteria is a another technique of data retrieval apart from HQL and native SQL queries. The primary advantage of the Criteria API is that it is intuitively designed to manipulate data without using any hard-coded SQL statements.

Question # 22 What is the difference between lazy and eager loading in hibernate?

Answer # All data is fetched when eager marked data in the object when session is connected. However, in case of lazy loading strategy, lazy loading marked object does not retrieve data if session is disconnected (after session.close() statement). All that can be made by hibernate proxy.

Question # 23 Is Sessionfactory immutable?

Answer # The internal state of a SessionFactory is immutable. Most problems with concurrency occur due to sharing of objects with mutable state. Once the object is immutable, its internal state is setted on creation and cannot be changed. So many threads can access it concurrently and request for sessions.

Question # 24 Is Hibernate configuration file mandatory?

Answer # Basically you are setting all the required properties via your properties object so there is no real need to tell Hibernate to look for a hibernate.cfg.xml file which is exactly what the configure() method does. No, it’s not mandatory to use hibernate.cfg.xml. Just don’t use .configure().

Question # 25 What is meant by annotation in hibernate?

Answer # Hibernate annotations are the newest way to define mappings without the use of XML file. You can use annotations in addition to or as a replacement of XML mapping metadata. Hibernate Annotations is the powerful way to provide the metadata for the Object and Relational Table mapping.

Hibernate Interview Questions And Answers For Experienced In Java

Question # 26 What does hibernate.hbm2ddl.auto create means?

Answer # hibernate.hbm2ddl.auto. Automatically validates or exports schema DDL to the database when the SessionFactory is created. With create-drop , the database schema will be dropped when the SessionFactory is closed explicitly.

Question # 27 What is the meaning of persistence in hibernate?

Answer # When a POJO instance is in session scope, it is said to be persistent i.e hibernate detects any changes made to that object and synchronizes it with database when we close or flush the session. And about hibernate.properties and XML Mapping.

Question # 28 How does Hibernate proxy work?

Answer # When a method is invoked on the object, Hibernate will fetch the data from the column and populate the object. This is the proxy mechanism. To add this new behavior (the loading of the data when a method is invoked), Hibernate will create a dynamic subclass of Person using CGLib and add the desired functionality.

Question # 29 What is first level cache in hibernate?

Answer # First level cache is associated with “session” object. The scope of cache objects is of session. First level cache is enabled by default and you can not disable it. When we query an entity first time, it is retrieved from database and stored in first level cache associated with hibernate session.

Question # 30 What is the use of Session in hibernate?

Answer # The main runtime interface between a Java application and Hibernate. This is the central API class abstracting the notion of a persistence service. The lifecycle of a Session is bounded by the beginning and end of a logical transaction. (Long transactions might span several database transactions.)

Hibernate Interview Questions And Answers For 3 Years Experience

Question # 31 What is lazy fetching in Hibernate?

Answer # Lazy fetching decides whether to load child objects while loading the Parent Object. You need to do this setting respective hibernate mapping file of the parent class. Lazy = true (means not to load child) By default the lazy loading of the child objects is true.

Question # 32 What is an SQL dialect?

Answer # SQL Dialect. The SQL dialect, derived from the Structured Query Language, uses human-readable expressions to define query statements. Use a SQL query statement with the following ADSI search interfaces: The ActiveX Data Object (ADO) interfaces, which are Automation interfaces that use OLE DB.

Question # 33 What is in HQL?

Answer # Hibernate Query Language (HQL) is an object-oriented query language, similar to SQL, but instead of operating on tables and columns, HQL works with persistent objects and their properties. HQL queries are translated by Hibernate into conventional SQL queries, which in turns perform action on database.

Question # 34 What is the use of projection in hibernate?

Answer # To put it simple, Hibernate Projections are used in order to query only a subset of the attributes of an entity or group of entities you’re querying with Criteria. You can also use Projections to specify distinct clauses and aggregate functions like max , sum and so on. Like modifying the select clause in an SQL query.

Question # 35 What is Lazyinitializationexception in hibernate?

Answer # Indicates access to unfetched data outside of a session context. For example, when an uninitialized proxy or collection is accessed after the session was closed.

Question # 36 What are the different cascade types in hibernate?

Answer #
JPA EntityManager action  – JPA CascadeType  –  Hibernate native Session action – Hibernate native CascadeTypedetach(entity)       DETACH  evict(entity)   DETACH or EVICT merge(entity)                     MERGE               merge(entity)              MERGEpersist(entity)                            PERSIST               persist(entity)            PERSISTrefresh(entity)                            REFRESH               refresh(entity)          REFRESHremove(entity)                            REMOVE               delete(entity)            REMOVE or DELETE                                                               saveOrUpdate(entity)                       SAVE_UPDATE                                                           replicate(entity, replicationMode)      REPLICATElock(entity, lockModeType)     buildLockRequest(entity, lockOptions)  LOCK

Question # 37 What is the use of Show_sql in hibernate?

Answer # Hibernate has build-in a function to enable the logging of all the generated SQL statements to the console. You can enable it by add a “show_sql” property in the Hibernate configuration file “ hibernate.cfg.xml “.

This function is good for basic troubleshooting, and to see what’s Hibernate is doing behind.

Question # 38 What is hbm2ddl in hibernate?

Answer # hibernate.hbm2ddl.auto Automatically validates or exports schema DDL to the database when the SessionFactory is created. With create-drop, the database schema will be dropped when the SessionFactory is closed explicitly.

Question # 39 What is the use of dialect in hibernate?

Answer # Dialect means “the variant of a language”. Hibernate, as we know, is database agnostic. It can work with different databases. However, databases have proprietary extensions/native SQL variations, and set/sub-set of SQL standard implementations. Therefore at some point hibernate has to use database specific SQL.

Question # 40 Can I disable first level cache in hibernate?

Answer # The scope of cache objects is of session. Once session is closed, cached objects are gone forever. First level cache is enabled by default and you can not disable it. When we query an entity first time, it is retrieved from database and stored in first level cache associated with hibernate session.

Hibernate Interview Questions And Answers For 4 Years Experience

Question # 41 What is criteria in hibernate?

Answer # In Hibernate, the Criteria API helps us build criteria query objects dynamically. Criteria is a another technique of data retrieval apart from HQL and native SQL queries. The primary advantage of the Criteria API is that it is intuitively designed to manipulate data without using any hard-coded SQL statements.

Question # 42 Which one is faster JDBC or hibernate?

Answer # JDBC will always give better performance as compared to Hibernate for most of the database vendors. The choice of hibernate over jdbc and sql queries is not because of the performance but because of reasons mainly object persistence and database independence in terms of not writing database specific queries.

Question # 43 What is the use of bag in hibernate?

Answer # Hibernate Bag is a java collection that stores elements without caring about the sequencing, but allow duplicate elements in the list. A bag is a random grouping of the objects in the list.

Question # 44 What is the use of Mappedby in hibernate?

Answer # With the mappedBy , you directly tell Hibernate/JPA that one table owns the relationship, and therefore it is stored as a column of that table. Without, the relationship is external and Hibernate/JPA need to create another table to store the relationship.

Question # 45 What is inverse true in hibernate?

Answer # The real meaning is that it defines which side is the parent or the relationship owner for the two entities (parent or child). Hence, inverse=”true” in a Hibernate mapping shows that this class (the one with this XML definition) is the relationship owner; while the other class is the child.

Question # 46 What is a bidirectional relationship?

Answer # Bidirectional Relationships. In a bidirectional relationship, each entity has a relationship field or property that refers to the other entity. Through the relationship field or property, an entity class’s code can access its related object.

Question # 47 What is the dirty checking in hibernate?

Answer # Hibernate allows dirty checking feature.All persistent objects are monitored by hibernate.it detects which objects have been modified and then calls update statements on all updated objects.the process of updating the changed object is called automatic dirty checking.

Question # 48 What are the important interfaces in hibernate?

Answer #
Session InterfaceSession Factory InterfaceConfiguration InterfaceTransaction InterfaceQuery and Criteria Interface

Question # 49 What is hibernate mapping file?

Answer # The mapping document is an XML document having <hibernate-mapping> as the root element, which contains all the <class> elements. The <class> elements are used to define specific mappings from a Java classes to the database tables.

Question # 50 What is difference between openSession() and getCurrentSession()?

Answer # If you set hibernate.current_session_context_class to thread and then implement something like a servlet filter that opens the session – then you can access that session anywhere else by using the SessionFactory.getCurrentSession().

SessionFactory.openSession() always opens a new session that you have to close once you are done with the operations.

SessionFactory.getCurrentSession() returns a session bound to a context – you don’t need to close this.

Hibernate Interview Questions And Answers For 5 Years Experience

Question # 51 What is difference between Session get() and load() method in Hibernate?

Answer #
Session.load() – It will always return a “proxy” (Hibernate  term) without hitting the database. In Hibernate, proxy is an object  with the given identifier value, its properties are not initialized yet,  it just look like a temporary fake object. If no row found , it will throws an ObjectNotFoundException.

Session.get() – It always hit the database and return the real object, an object that represent the database row, not proxy.If no row found , it return null.

Question # 52 What are different states of an entity bean in Hybernate?

Answer # The Entity bean has three states:
TransientPersistentDetached

Transient: When ever we create a new object of Entity bean then we can say that is in Transient state,At that time any modification in the object state does not effect on database.

Persistent: When ever the Object of entity bean associated with session we can say that is in persistent state, if any change in the object state , then that modification effects in database.

Detached :When ever the object is removed from session then it enters in to detached state.Any modification on detached state object , does not effect in database.

Question # 53 Difference between hibernate session merge() vs update()?

Answer # Hibernate handles persisting any changes to objects in the session when the session is flushed. update can fail if an instance of the object is already in the session. Merge should be used in that case. It merges the changes of the detached object with an object in the session, if it exists.

Question # 54 Difference between save() and saveorupdate() in hibernate?

Answer # The important difference between the org.hibernate.Session class methods, save & saveOrUpdate is, save generates a new identifier and results in an INSERT query, whereas saveOrUpdate does an INSERT or an UPDATE. Save method stores an object into the database.

Question # 55 What is the difference between save() and persist() in hibernate?

Answer # persist() – Hibernate persist is similar to save (with transaction) and it adds the entity object to the persistent context, so any further changes are tracked. If the object properties are changed before the transaction is committed or session is flushed, it will also be saved into database.

persist() also guarantees that it will not execute an INSERT statement if it is called outside of transaction boundaries. This is useful in long-running conversations with an extended Session/persistence context.

save() does not guarantee the same, it returns an identifier, and if an INSERT has to be executed to get the identifier (e.g. “identity” generator, not “sequence”), this INSERT happens immediately, no matter if you are inside or outside of a transaction. This is not good in a long-running conversation with an extended Session/persistence context.

Hibernate Tricky Interview Questions For Experienced

Question # 56 What are the collection types in Hibernate?

Answer # Hibernate collections types are:
java.util.List.java.util.Set.java.util.SortedSet.java.util.Map.java.util.SortedMap.java.util.Collection.or write the implementation of org.hibernate.usertype.UserCollectionType.

Question # 57 How to implement Joins in Hibernate?

Answer # Using HQL we can implement joins in hibernate.
HQL Joins – HQL supports inner join, left outer join, right outer join and full join. For example, select e.name, a.city from Employee e INNER JOIN e.address a . In this query, Employee class should have a variable named address.

Question # 58 What is Named SQL Query?

Answer # A named query is a SQL expression represented as a table. In a named query, you can specify an SQL expression to select rows and columns returned from one or more tables in one or more data sources.

Question # 59 What is Hibernate Criteria API?

Answer # In Hibernate, the Criteria API helps us build criteria query objects dynamically. Criteria is a another technique of data retrieval apart from HQL and native SQL queries. The primary advantage of the Criteria API is that it is intuitively designed to manipulate data without using any hard-coded SQL statements.

Question # 60 What are callback interfaces in hibernate?

Answer # Callback interface for Hibernate code. To be used with HibernateTemplate ‘s execution methods, often as anonymous classes within a method implementation. The typical implementation will call Session.load/find/update to perform some operations on persistent objects.

Hibernate Tough Interview Questions And Answers For Experienced

Question # 61 What is transaction management in hibernate?

Answer # In a non-managed environment, Hibernate is usually responsible for its own database connection pool. The application developer has to manually set transaction boundaries (begin, commit, or rollback database transactions) themselves.

Question # 62 What are the mapping associations used in hibernate?

Answer # There are two mapping associations used in hibernate, they are:
1) One-to-One Association2) Many-to-Many Association

Question # 63 What is Hibernate QBC API?

Answer # Hibernate Query By Criteria (QBC) API is used to create queries by manipulation of criteria objects at runtime.

Question # 64 What is hibernate criteria join?

Answer # Hibernate Criteria JOIN API allows users to perform join operation.
Suppose you have to perform a operation like
SELECT S.*, C.* FROM STUDENT S, CONTACT  C WHERE S.ROLL_NO=C.ID;
Then you can write this statement using Criteria join in a very simple way
Criteria criteria = session.createCriteria(Student.class);criteria.setFetchMode(“Contact”, FetchMode.JOIN);List list = criteria.list();

Question # 65 What is the is the default transaction factory in hibernate?

Answer # JDBCTransactionFactory is the default transaction factory in hibernate.

Hibernate Real Time Interview Questions And Answers For Experienced

Question # 66 What is JMX in Hybernate?

Answer # Java Management Extensions (JMX) is a Java technology that supplies tools for managing and monitoring applications, system objects, devices (such as printers) and service-oriented networks. Those resources are represented by objects called MBeans (for Managed Bean).

Question # 67 How to bind hibernate session factory to JNDI?

Answer # When binding the SessionFactory to JNDI, Hibernate will use the values of hibernate.jndi.url , hibernate.jndi.class to instantiate an initial context.

Question # 68 What are the fetching strategies in hibernate?

Answer # There are four fetching strategies

1. fetch-“join” = Disable the lazy loading, always load all the collections and entities.

2. fetch-“select” (default) = Lazy load all the collections and entities.

3. batch-size=”N” = Fetching up to ‘N’ collections or entities, *Not record*.

4. fetch-“subselect” = Group its collection into a sub select statement.

Question # 69 What are derived properties in hibernate?

Answer # In Hibernate a derived property (also called a calculated property) is a read-only property whose value is calculated at fetch time using SQL expressions.

Question # 70 What is version property in hibernate?

Answer # The <version> property (or @Version annotation) – We know that that Hibernate can provide optimistic locking through a version property on your persistent objects. Furthermore, the version property is automatically managed by Hibernate.

Advanced Hibernate Interview Questions And Answers For Experienced

Question # 71 What does session lock () method do in hibernate?

Answer # The lock() method, with LockOptions.NONE, can be used to associate a detached object to a session and put the object back into a persistence context. On top is Hibernate code to reattach a detached object using a typical update method call. On the bottom is code to reattach a detached object using a lock method call.

Question # 72 What does evict do in hibernate?

Answer # evict() To detach the object from session cache, hibernate provides evict() method. After detaching the object from the session, any change to object will not be persisted. The associated objects will also be detached if the association is mapped with cascade=”evict”.

Question # 73 What is implicit polymorphism in hibernate?

Answer # Implicit polymorphism means if a class or interface is used in HQL, criteria or named queries, hibernate fetches the records from the table mapped to the used class along with all the tables mapped to its subclasses, at any hierarchy level. This is one of the great advantage for using hibernate.

Question # 74 What is table per concrete class in hibernate?

Answer # When we use Table Per Concrete class in hibernate, tables are created per class. So there are no nullable values in the table. Disadvantage of this approach is that duplicate columns are created in the subclass tables.

Question # 75 What is light object mapping in hibernate?

Answer # Light Object Mapping is one of the levels of ORM quality in which all entities are represented as classes and they are mapped manually in the Relational Tables.

The code is hidden from the business logic by implementing specific design patterns. In this Light Object Mapping in Hibernate is one of the valuable levels of ORM quality that approach for successful application which having less number of entities, or for common applications, Metadata and driven data models.

RELATED INTERVIEW QUESTIONS

  1. ASP.NET Interview Questions
  2. PHP Interview Questions
  3. Kubernetes Interview Questions
  4. Docker Interview Questions
  5. CEH Interview Questions
  6. CyberArk Interview Questions
  7. Appian Interview Questions
  8. Drools Interview Questions
  9. Talend Interview Questions
  10. Selenium Interview Questions
  11. Ab Initio Interview Questions
  12. AB Testing Interview Questions
  13. Mobile Application Testing Interview Questions
  14. Pega Interview Questions
  15. UI Developer Interview Questions
  16. Tableau Interview Questions
  17. SAP ABAP Interview Questions
  18. Reactjs Interview Questions
  19. UiPath Interview Questions
  20. Automation Anywhere Interview Questions
  21. RPA Interview Questions
  22. RPA Blue Prism Interview Questions
  23. Ranorex Interview Questions
  24. AWS Interview Questions
  25. SSRS Interview Questions
  26. SQL Interview Questions
  27. Informatica MDM Interview Questions
  28. CyberArk Interview Questions
  29. SAP SD Interview Questions
  30. SAP EWM Interview Questions

ASP.NET Interview Questions And Answers For Experienced

100 ASP.NET Interview Questions and Answers 2018. This list includes ASP.NET interview questions for freshers, ASP.NET interview questions for 1 year experience, ASP.NET interview questions for 2 years experience, ASP.NET interview questions for 3 years experience, ASP.NET interview questions for 4 years experience, ASP.NET interview questions for 5 years experience.

Asp.NET Interview Questions

Question # 1 What is ASP.NET?

Answer # ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required to build web-based applications.

Question # 2 Is asp net free?

Answer # Misconception: It’s Closed. Microsoft makes the source code for the .NET Framework available for free. Microsoft is a company that sells software, and they are naturally very protective of their products’ source code. So, one might think that ASP.NET (and .NET in general) is closed source, but that is not the case.

Question # 3 What is CSS in asp net?

Answer # ASP.NET Web pages function as HTML pages at run time. You can therefore use cascading style sheets (CSS) to set the appearance of any elements on the page other than Web server controls.

Question # 4 What is asp net c#?
C# is a CLS programming language designed for the .NET framework. ASP.NET is part of the .NET framework allowing you to write web applications using any CLS compliant language such as C#, VB.NET, F#, etc.

Question # 5 What is the full meaning of ASP Net?

Answer # It was first released in January 2002 with version 1.0 of the .NET Framework, and is the successor to Microsoft’s. Active Server Pages (ASP) technology. ASP.NET is built on the Common Language Runtime (CLR), allowing programmers to writeASP.NET code using any supported .NET language.

Question # 6 Why do we use ASP net?

Answer # ASP.NET is an open-source server-side web application framework designed for web development to produce dynamic web pages. It was developed by Microsoft to allow programmers to build dynamic web sites, web applications and web services.

Question # 7 What is ASP short for?

Answer # ASP is also an abbreviation for Active Server Page. An application service provider (ASP) is a company that offers individuals or enterprises access over the Internet to applications and related services that would otherwise have to be located in their own personal or enterprise computers.

Question # 8 What is the difference between C# and .NET?

Answer # C# is a language, .NET is an application framework. The .NET libraries can run on the CLR and thus any language which can run on the CLR can also use the .NET libraries. This common .net format is what allows libraries to be shared between .net languages (C#, VB.Net, F# and others) easily.

Question # 9 What is the difference between ASP and ASP NET?
ASP is interpreted whereas, ASP.NET is compiled. This implies that since ASP uses VBScript; therefore, when an ASP page is executed, it is interpreted. On the other hand, ASP.NET uses .NET languages, such as C# and VB.NET, which are compiled to Microsoft Intermediate Language (MSIL).

Question # 10 Is asp net a programming language or framework?

Answer # ASP.NET is a framework generally written in one of two languages – VB script or C#. ASP .NET is a server-side scripting language. Your .aspx pages are just scripts that tell IIS how to render a page.

Asp.NET Interview Questions For Freshers

Question # 11 Can you use C# without .net?

Answer # C# is just a programming language. … C# is the choice for developing managed applications which run on .NET Framework. If you want to avoid it, you can go to Visual C++ (without .NET) development using Visual Studio. However, .NET framework comes pre-installed with latest Operating system.

Question # 12 What are the advantages of ASP Net?

Answer # Some key advantages of ASP.NET framework for Web development are as follows:
* Built-in Windows authentication and per-application configuration keep your applications secured.
* ASP.NET reduces the line of code needed to develop large applications.
* The ASP code and HTML smoothly mix with each other to generate dynamic web pages.
* It is an ideal server-side scripting technology that is why code runs on the windows server before displaying on the web browser.
* Dot NET framework is language independent, so choose any programming language that best suited to develop your application.
* ASP.NET is easy to deploy because of built-in configuration information.
* The Windows Web server precisely monitors the web pages, various components and application running over it.
* It immediately gives an alert for any memory leaks, unbounded loops and other illegal behaviors. It instantly kills those behaviors and restarts automatically.
* ASP.Net features such as early binding, JIT compilation, caching services and native optimization supports to get high level of performance.
* All the applications are minutely monitored and managed to help application continuously available to handle requests.
* WYSIWYG is an editor tool available in Visual studio.ASP.NET, with its advantages, is the next- generation platform of Microsoft’s ASP. It is a widely used development framework for developing an enterprise level web application. Either for building a small website or a large corporate web application, ASP.NET is the best development application that today’s developers love to use.

Question # 13 What is the MVC framework?

Answer # The Model-View-Controller (MVC) architectural pattern separates an application into three main components: the model, the view, and the controller. The ASP.NET MVC framework provides an alternative to the ASP.NET Web Forms pattern for creating Web applications.

Question # 14 What is the difference between asp net and MVC?

Answer # ASP.NET Web Forms is another framework specifically for building web applications, and the new ASP.NET Web API is a platform for building web services.

Question # 15 ASP.NET MVC2 web application is based on MVC pattern in order to facilitate unit test, without mocking pipeline asp.net, because it’s very difficult. you don’t have code on Code Behind in order to separate your code graphic and your code functional. With MVC your application becomes independent of view. you can replace easily technology of creating view.

Question # 16 What is the difference between Visual Basic and ASP Net?

Answer # VB.NET is a language that is used in writing programs that are utilizing the ASP.NET framework. ASP.NET is a server side technology that is language independent. Any .NET languages such as C#, VB.NET can be used to develop web applications through ASP.NET. VB.NET is a .NET programming language.

Question # 17 What is the CLR?

Answer # The Common Language Runtime (CLR), the virtual machine component of Microsoft’s .NET framework, manages the execution of .NET programs. A process known as just-in-time compilation converts compiled code into machine instructions which the computer’s CPU then executes.

Question # 18 What is CSS and what is it used for?

Answer # CSS is the language for describing the presentation of Web pages, including colors, layout, and fonts. It allows one to adapt the presentation to different types of devices, such as large screens, small screens, or printers. CSS is independent of HTML and can be used with any XML-based markup language.

Question # 19 What is the use of ASP Net Web API?

Answer # ASP.NET Web API is a framework that makes it easy to build HTTP services that reach a broad range of clients, including browsers and mobile devices. ASP.NET Web API is an ideal platform for building RESTful applications on the .NET Framework.

Question # 20 What is the MVC model?

Answer # Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces on computers. It divides a given application into three interconnected parts. This is done to separate internal representations of information from the ways information is presented to, and accepted from, the user.

Asp.NET Interview Questions For 1 Year Experience

Question # 21 What is MVC in angular?

Answer # AngularJS – MVC Architecture. Advertisements. Model View Controller or MVC as it is popularly called, is a software design pattern for developing web applications. A Model View Controller pattern is made up of the following three parts − Model − It is the lowest level of the pattern responsible for maintaining data.

Question # 22 Is asp net a programming language or framework?

Answer # ASP.NET is a framework generally written in one of two languages – VB script or C#. ASP .NET is a server-side scripting language. Your .aspx pages are just scripts that tell IIS how to render a page.

Advanced ASP.NET Interview Questions

Question # 23 What is STA?
STA stands for Single Threaded Apartment. In STA, there may be multiple apartment. But only single thread can be executed in an apartment.

Question #  24 What is MTA?

Answer # MTA stands for Multi Threaded Apartment. In MTA, only one apartment will be there and all threads will execute within that single apartment.

Question # 25 What threading model used in asp and asp.net?

Answer # ASP used STA threading model and ASP.NET uses MTA threading model.

Question # 26 What is a web farm?

Answer # A web farm is a group of two or more servers used to host the same site. Web farms increase the capacity of a web site, and improve availability by providing fail-over. Web farms are universally used for high-traffic and mission critical web sites.

Question # 27 What is web garden?

Answer # Application pool is used to separate sets of IIS worker processes and enables a better security, reliability, and availability for any web application. Now, by default, each and every Application pool contains a single worker process. Application which contains the multiple worker process is called “Web Garden”.

Question # 28 What is a Web pool?

Answer # When you run IIS 6.0 in worker process isolation mode, you can separate different Web applications and Web sites into groups known as application pools. An application pool is a group of one or more URLs that are served by a worker process or set of worker processes.

Question # 29 What is the use of worker process in asp net?

Answer # Application Pool. Worker Process: Worker Process (w3wp.exe) runs the ASP.Net application in IIS. This process is responsible for managing all the request and response that are coming from the client system. All the ASP.Net functionality runs under the scope of the worker process.

Question # 30 What is a server farm in IIS?

Answer # The first step in installing and configuring an IIS 8 web farm is to install IIS on the web servers and load balancing server. Then install Application Request Routing (ARR) on the load balancing server. Finally, set up your website on one of the web servers.

Question # 31 What is the application pool?

Answer # Application pools are used to separate sets of IIS worker processes that share the same configuration and application boundaries. Application pools used to isolate our web application for better security, reliability, and availability and performance and keep running without impacting each other .

Question # 32 How does the IIS work?

Answer # IIS (Internet Information Server) is one of the most powerful web servers from Microsoft that is used to host your Web application. IIS has it’s own Process Engine to handle the request. So, when a request comes from client to server, IIS takes that request and process it and send response back to clients.

Question # 33 What is the difference between trace and debug in asp.net?

Answer # The Debug and Trace classes have very similar methods. The primary difference is that calls to the Debug class are typically only included in Debug build and Trace are included in all builds (Debug and Release). You can control this through the compiler flags DEBUG and TRACE.

Question # 34 Explain different types of validators in ASP.NET?

Answer #

Required field Validator
Range Validator
Compare Validator
Custom Validator
Regular expression Validator
Summary Validator

Question # 35 How many types of session state management options available in ASP.NET?

Answer # In ASP.Net, there are two session state managemtn options are available, they are:
In-Process
Out-of-Process.

Question # 36 What are the page life cycle events?

Answer # List the events in page life cycle.

1) Page_PreInit
2) Page_Init
3) Page_InitComplete
4) Page_PreLoad
5) Page_Load
6) Page_LoadComplete
7) Page_PreRender
8) Render

Question # 37 How many types of cookies are there in ASP.NET?

Answer # Session Cookie – Resides on the client machine for a single session until the user logs out.
Persistent Cookie – Resides on a user’s machine for a period specified for its expiry, such as 10 days, one month, and never based on the settings.

ASP.NET Interview Questions And Answers For 2 Years Experience

Question # 38 What is the difference between Union and Union all?

Answer # The difference between Union and Union all is that Union all will not eliminate duplicate rows, instead it just pulls all rows from all tables fitting your query specifics and combines them into a table. A UNION statement effectively does a SELECT DISTINCT on the results set.

Question # 39 Which is faster union or union all?

Answer # Just like JOINS, UNION combines data into a single record-set but vertically by adding rows from another table. JOINS combine data horizontally by adding columns from another table. UNION insures you get DISTINCT records from both the tables.

Question # 40 What is the difference between union and join?

Answer # By using JOINs, you can retrieve data from two or more tables based on logical relationships between the tables. Joins indicate how SQL should use data from one table to select the rows in another table. The UNION operation is different from using JOINs that combine columns from two tables.

Question # 41 What is the difference between union and structure?

Answer # The difference between structure and union is, The amount of memory required to store a structure variable is the sum of the size of all the members. On the other hand, in case of unions, the amount of memory required is always equal to that required by its largest member.

Question # 42 Which is better union or union all?

Answer # UNION ALL command is equal to UNION command, except that UNION ALL selects all the values. The difference between Union and Union all is that Union all will not eliminate duplicate rows, instead it just pulls all the rows from all the tables fitting your query specifics and combines them into a table.

Question # 43 What are SQL Joins?

Answer # SQL Joins clause is used to combine records from two or more tables in a database. A JOIN is a means for combining fields from two tables by using values common to each.

  • Inner join
  • Outer join
  • Left outer join
  • Right outer join
  • Full outer join

Question # 44 What is a session in asp net?

Answer # ASP.NET session state enables you to store and retrieve values for a user as the user navigates ASP.NET pages in a Web application. HTTP is a stateless protocol. This means that a Web server treats each HTTP request for a page as an independent request.

Question # 45 What is application and session in ASP.NET?

Answer # Application and Session Variables. The Application and Session objects can be used to store values that are global either to a particular user (the Session ) or to all users (the Application )

Question # 46 What are the types of session in asp net?

Answer # Following are the different types of session modes available in ASP.NET:

  • Off.
  • InProc.
  • StateServer.
  • SQLServer.
  • Custom.

Question # 47 What is the difference between session and viewstate in asp net?

Answer # SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes. View State are valid mainly during postbacks and information is stored in client only. Viewstate are valid for serializable data only.

Question # 48 When does a session actually start?

Answer # Session actually starts when a visitor requests a website for the first time.

Question # 48 How is a session stored and maintained in ASP.NET?

Answer # When a web app is requested by the user for the first time, the server creates a sessionID and stores it in the cookie of the client browser. This sessionID is sent to the server in all the subsequent requests.

Question # 49 What are HTML helpers in ASP.NET?

Answer # ASP.NET MVC provides HtmlHelper class which contains different methods that help you create HTML controls programmatically.

Question # 50 What is the difference between Session.Abandon() vs Clear()?

Answer # Clear – Removes all keys and values from the session-state collection. Abandon – removes all the objects stored in a Session. If you do not call the Abandon method explicitly, the server removes these objects and destroys the session when the session times out.

Advanced ASP.NET Interview Questions And Answers

Question # 51 What is the difference between Stored Procedure vs Function?

Answer # Function must return a value but in Stored Procedure it is optional( Procedure can return zero or n values). Functions can have only input parameters for it whereas Procedures can have input/output parameters . Functions can be called from Procedure whereas Procedures cannot be called from Function.

Question # 52 What are the various ways to send content from one page to another?

Answer # There are different ways are there to send content from one page another page.

  • Response. Redirect()
  • Server.Transfer()
  • WebClient.DownloadFile()

Question # 53 What is the difference between sealed vs static class?

Answer # When a class defined as sealed its not possible to inherit. A static class can have only static member (e.g static method, property, and variables). A static class restrict the user to call default constructor of the class. Static classes can only have static constructor to initialize static members.

ASP.NET Interview Questions And Answers For 3 Years Experience

Question # 54 What is your current project?

Question # 55 What is your team size in the current project?

Question # 56 What is the team hierarchy of your project?

Question # 57 What are your roles and responsibilities in your project?

Question # 58 Can you explain about your previous projects?

Answer # Interviewers ask these type of questions to know if you are a genuine candidate or not. Explain these type of questions with confidence.

Question # 59 What is the difference between abstract class vs interface? Can give me the real time examples?

Answer # A class that implements an interface must provide an implementation of all the methods of that interface. abstract classes may contain state (data members) and/or implementation (methods) abstract classes can be inherited without implementing the abstract methods (though such a derived class is abstract itself)

Question # 60 What is Authentication in ASP.NET?

Answer # Authentication is the process of obtaining identification credentials such as name and password from a user and validating those credentials against some authority. If the credentials are valid, the entity that submitted the credentials is considered an authenticated identity.

Question # 61 What are the authentication types in asp.net?

Answer #

  • Windows authentication and IIS.
  • Passport authentication.
  • Forms authentication.
  • After your application has authenticated users, you can proceed to authorize their access to resources.

Question # 62 Which authentication uses a combination of Windows and IIS authentication?

Answer # In IIS7, ASP.NET is integrated into the request pipeline, and the composite effect is that there is only one authentication mechanism to maintain. Passport authentication uses Microsoft’s Windows Live ID Authentication (formally .NET Passport), which you have to be licensed to use.

Question # 63 What is the default authentication mode for asp net?

Answer # Windows authentication is used together with IIS authentication. Authentication is performed by IIS in the following ways: basic, digest, or Integrated Windows Authentication. When IIS authentication is complete, ASP.NET uses the authenticated identity to authorize access. This is the default setting.

Question # 64 What is the difference between authentication and authorization?

Answer # When you log on to a PC with a user name and password you are authenticating. Authorization is the process of verifying that you have access to something. Gaining access to a resource (e.g. directory on a hard disk) because the permissions configured on it allow you access is authorization.

Question # 65 What is Windows Active Directory authentication?

Answer # Active Directory authentication offers users a faster, more secure, and more scalable authentication mechanism than LDAP authentication. By using the Kerberos authentication protocol, SGD can securely authenticate any user against any domain in a forest. Active Directory authentication is disabled by default.

Question # 66 What is anonymous authentication?

Answer # Anonymous authentication allows any user to access any public content without providing a user name and password challenge to the client browser. By default, Anonymous authentication is enabled in IIS 7.

Question # 67 Is oauth for authentication or authorization?

Answer # Many point to Identity Providers like Facebook to prove their point. The problem is that OAuth 2.0 is a Delegated Authorization protocol, and not a Authentication protocol. This is generally a four party model User, Website, Authorization server, and Protected resource.

Question # 68 What is the difference between LDAP and Active Directory?

Answer # LDAP (Lightweight Directory Access Protocol) is an application protocol for querying and modifying items in directory service providers like Active Directory, which supports a form of LDAP. Short answer: AD is a directory services database, and LDAP is one of the protocols you can use to talk to it.

Question # 69 Why we use DBMS for projects ? Why don’t we save any application data in separate files instead of DBMS?

Answer # Normalization of the data is the main advantage of using DBMS instead of saving data in seperate files.

Question # 70 What is the differences between a Primary key and a Unique key in SQL server?

Answer # Primary Key is used to identify a row (record) in a table, whereas Unique-key is to prevent duplicate values in a column (with the exception of a null entry). By default SQL-engine creates Clustered Index on primary-key if not exists and Non-Clustered Index on Unique-key.

ASP.NET Real Time Interview Questions And Answers

Question # 71 What are the differences between primary foreign and unique keys?

Answer # A primary key is a column or a set of columns that uniquely identify a row in a table. A primary key should be short, stable and simple.

A foreign key is a field (or collection of fields) in a table whose value is required to match the value of the primary key for a second table. A table can have multiple foreign keys.

Question # 72 What is the difference between a candidate key and primary key?

Answer # Candidate Key – A Candidate Key can be any column or a combination of columns that can qualify as unique key in database. There can be multiple Candidate Keys in one table. Each Candidate Key can qualify as Primary Key.

Primary Key – A Primary Key is a column or a combination of columns that uniquely identify a record.

Question # 73 Can the unique key be null?

Answer # One row in the database is allowed to have null for the value of the unique key constraint.

Question # 74 Can I have a unique key as foreign key?

A FOREIGN KEY constraint does not have to be linked only to a PRIMARY KEY constraint in another table; it can also be defined to reference the columns of a UNIQUE constraint in another table. So in your case if you make AnotherID unique, it will be allowed.

Question # 75 How may clustered index we can create in table?

Answer # Generally we can create only one clustered index in a table, but if required there is a way to create more clustered index in a table.

Question # 76 What is the difference between clustered and nonclustered index?

Answer # A clustered index actually describes the order in which records are physically stored on the disk, hence the reason you can only have one. A Non-Clustered Index defines a logical order that does not match the physical order on disk.

Question # 77 What is distributed system in ASP.NET?

Answer # A distributed system is a network that consists of autonomous computers that are connected using a distribution middleware. They help in sharing different resources and capabilities to provide users with a single and integrated coherent network.

Question # 78 What is Web API and why to use it?

Answer # Asp.Net Web API is a framework for building HTTP services that can be consumed by a broad range of clients including browsers, mobiles, iphone and tablets. … It is a part of the core ASP.NET platform and can be used with MVC and other types of Web applications like Asp.Net WebForms.

Question # 79 What is difference between Web API and Web services?

Answer # Web Services are based on the SOAP protocol. Web API is a newer Microsoft framework which helps you to build REST based interfaces. The response can be either JSON or XML, but there is no way to generate clients automatically because Web Api does not offer a service description like the WSDL from Web Services.

Question # 80 What is Web API vs WCF?

Answer # While WCF is a unified framework for building service oriented applications, Web API is a light weight alternative to build RESTful services that can be consumed by many different clients. RESTful services use basic HTTP and are simple with much less payload compared to SOAP services.

Question # 81 What is difference between REST and SOAP?

Answer # Web services are of two kinds: Simple Object Access Protocol (SOAP) and Representational State Transfer (REST). SOAP defines a standard communication protocol (set of rules) specification for XML-based message exchange. SOAP uses different transport protocols, such as HTTP and SMTP.

Question # 82 Why Web API is better than WCF?

Answer # Since WCF is SOAP based, which uses standard XML schema over HTTP, it could lead to slower performance. WEB API is a better choice for simpler, light weight services. WEB API can use any text format including XML and is faster than WCF. WEB API can be used to create full-blown REST Services.

Question # 83 What is the difference between rest and restful?

Answer # Representational state transfer (REST) is a style of software architecture. As described in a dissertation by Roy Fielding, REST is an “architectural style” that basically exploits the existing technology and protocols of the Web. RESTful is typically used to refer to web services implementing such an architecture.

ASP.NET Interview Questions and Answers for 4 Years Experience

Question # 84 What is the difference between a process and a thread?

Answer # Threads are used for small tasks, whereas processesare used for more ‘heavyweight’ tasks – basically the execution of applications. Another difference betweenthread and a process is that threads within the same process share the same address space, whereas different processes do not.

Question # 85 What is the difference between exe and dll?

Answer # Difference between exe and dll

1.EXE is an extension used for executable files while DLL is the extension for a dynamic link library.

2.An EXE file can be run independently while a DLL is used by other applications.

3.An EXE file defines an entry point while a DLL does not.

Question # 86 Is a DLL file an executable?

Answer # EXE file is a executable file which runs in a separate process which is managed by OS. DLLs are not directly executable . They are separate files containing functions that can be called by programs and other DLLs to perform computations and functions. DLL: They can be reused for some other application.

Question # 87 What is the GAC?

Answer # The Global Assembly Cache (GAC) is a folder in Windows directory to store the .NET assemblies that are specifically designated to be shared by all applications executed on a system.

Question # 88 What is strong-typing versus weak-typing? Which is preferred?

Answer #

Strong typing: It checks the type of variables  as soon as possible, usually at compile time. It  prevents mixing operations between mismatched types.

Weak Typing: While weak typing is delaying checking the types of the system as late as possible, usually to run-time. In this you can mix types without an explicit conversion.

A “weak-typed” programming language is simply one which is not strong-typed.

which is preferred depeneds on what you want. for scripts and good stuff you will usually want weak typing, because you want to write as much less code as possible. in big programs, strong typing can reduce errors at compile time.

Question # 89 What is the difference between equals() and == in c#?

Answer # The only difference between Equal and == is on object type comparison. in other cases, such as reference types and value types, they are almost the same(either both are bit-wise equality or both are reference equality). The == operator can be used to compare two variables of any kind, and it simply compares the bits.

Question # 90 What is boxing and unboxing in asp.net?

Answer # Boxing is the process of converting a value type to the type object or to any interface type implemented by this value type. When the CLR boxes a value type, it wraps the value inside a System.Object and stores it on the managed heap. Unboxing extracts the value type from the object.

ASP.NET MVC Interview Questions For Experienced

Question # 91 What is Reflection?

Answer # With reflection we can dynamically create an instance of a type, bind the type to an existing object, or get the type from an existing object and invoke its methods or access its fields and properties. We can also access attribute information using reflection.

Question # 92 What is full trust in ASP.NET?

Answer # Full trust is the default, allows ASP.NET applications to execute native code, to read from the Registry and Windows Event Log, and to read and write to files outside of the application’s virtual directory. In short, with full trust one web application could delete the entire contents of another web application.

Question # 93 What is the difference between debug and release?

Answer # The biggest difference between these is that: In a debug build the complete symbolic debug information is emitted to help while debugging applications and also the code optimization is not taken into account. While in release build the symbolic debug info is not emitted and the code execution is optimized.

ASP.NET Interview Questions And Answers For 5+ Years Experience

Question # 94 What is the purpose of XML Namespaces?

Answers # XML namespaceXML namespaces are used for providing uniquely named elements and attributes in an XML document. They are defined in a W3C recommendation. An XML instance may contain element or attribute names from more than one XML vocabulary.

Question # 95 What is the difference between typeof() vs GetType()?

Answers # typeOf is a C# keyword that is used when you have the name of the class. It is calculated at compile time and thus cannot be used on an instance, which is created at runtime. GetType is a method of the object class that can be used on an instance.

Question # 96 Why would anyone need to implement their own hashtable or linked list?

Answers # I’m not implying that the Dictionary class is inferior or that people should roll their own hashtable. This is a basic question which tests whether a person has a minimal understanding of datastructures. Thats what these questions test for: bare minimum understanding.

Question # 97 what is XSS?

Answer # Cross-site Scripting (XSS) refers to client-side code injection attack wherein an attacker can execute malicious scripts (also commonly referred to as a malicious payload) into a legitimate website or web application.

Question # 98 What is X XSS protection?

Answer # The HTTP XXSSProtection response header is a feature of Internet Explorer, Chrome and Safari that stops pages from loading when they detect reflected cross-site scripting (XSS) attacks.
Question # 99 What is data cache in SQL Server?
Answer # An SQL Server buffer pool, also called an SQL Server buffer cache, is a place in system memory that is used for caching table and index data pages as they are modified or read from disk.
Question # 100 How do you implement SQL caching in ASP.NET?
Answer # ASP.NET allows us to use the SqlCacheDependency class to create a cache item dependency on a table in a database. It has the ability to automatically invalidate a cached data object when the related data is modified in the database. This feature is supported in from SQL Server 2005+ versions

RELATED INTERVIEW QUESTIONS

  1. Hibernate Interview Questions
  2. PHP Interview Questions
  3. Kubernetes Interview Questions
  4. Docker Interview Questions
  5. CEH Interview Questions
  6. CyberArk Interview Questions
  7. Appian Interview Questions
  8. Drools Interview Questions
  9. Talend Interview Questions
  10. Selenium Interview Questions
  11. Ab Initio Interview Questions
  12. AB Testing Interview Questions
  13. Mobile Application Testing Interview Questions
  14. Pega Interview Questions
  15. UI Developer Interview Questions
  16. Tableau Interview Questions
  17. SAP ABAP Interview Questions
  18. Reactjs Interview Questions
  19. UiPath Interview Questions
  20. Automation Anywhere Interview Questions
  21. RPA Interview Questions
  22. RPA Blue Prism Interview Questions
  23. Ranorex Interview Questions
  24. AWS Interview Questions
  25. SSRS Interview Questions
  26. SQL Interview Questions
  27. Informatica MDM Interview Questions
  28. CyberArk Interview Questions
  29. SAP SD Interview Questions
  30. SAP EWM Interview Questions

Advanced PHP Interview Questions And Answers

PHP Interview Questions And Answers For Experienced 2018. Here in this article, we are providing a list of 135 real-time scenario based PHP interview questions for freshers and professionals. This list includes PHP interview questions for 1 year experience, 2 year experience, 3 year experience, 4 year experience, 5 year experienced PHP developers and experienced PHP programmers.

PHP Interview Questions

Core PHP Interview Questions

  1. What is PHP?
  2. What is PHP and why it is used?
  3. Why PHP was called as personal home page?
  4. What is PHP compared to HTML?
  5. What is a PHP 5?
  6. What is PHP and what does it do?
  7. What is the difference between PHP and Javascript?
  8. What is the difference between HTML and PHP?
  9. What are the advantages of using PHP?
  10. What is the difference between Python and PHP?

PHP Interview Questions And Answers

These 135 advanced PHP interview questions and answers were written by PHP experienced professionals to help senior PHP developers. This is one place for all beginners to experienced PHP programmers for basic interview questions to most advanced PHP technical interview questions and answers. Let’s dive into the post and enjoy reading. We hope that this list will help you to crack your next PHP job interview. Happy learning.

PHP Interview Questions And Answers For Freshers

Question # 1) What is PHP?

Answer # PHP: Hypertext Preprocessor is a widely-used open source general-purpose scripting language that is especially suited for web development and can be embedded into HTML.

 

Question # 2) What is PHP and why it is used?

Answer # PHP is a general-purpose scripting language that is especially suited to server-side web development, in which case PHP generally runs on a web server. Any PHP code in a requested file is executed by the PHP runtime, usually to create dynamic web page content or dynamic images used on websites or elsewhere.

 

Question # 3) Why PHP was called as personal home page?

Answer # php is called hypertext pre-processor as its libraries are already compiled. When any person request for any php page in the address bar of the browser that request is first sent to the server then server interpret php files and return back response in form of Html.

 

Question # 4) What is PHP compared to HTML?

Answer # HTML is a language used to describe to a browser how to display text and other objects in a browser window. It is not a programming language. HTML works on a client computer (the system on which the page is being viewed). PHP is a scripting language, and can be used to create web pages written in HTML.

 

Question # 5) What is a PHP 5?

Answer # PHP 5 is a server scripting language, and a powerful tool for making dynamic and interactive Web pages. PHP is a widely-used, free, and efficient alternative to competitors such as Microsoft’s ASP.

Top PHP Interview Questions

Question # 6) What is PHP and what does it do?

Answer # PHP is mainly focused on server-side scripting, so you can do anything any other CGI program can do, such as collect form data, generate dynamic page content, or send and receive cookies. But PHP can do much more. There are three main areas where PHP scripts are used. Server-side scripting.

 

Question # 7) What is the difference between PHP and Javascript?

Answer # While JS is used for client side scripting (except in node.js) and PHP is used for server side scripting. Simply, JavaScript codes are executed by your web browser, like the catchy animations or simple calculations . Your browser does all the processing. While PHP runs on the server, where your webpage is stored.

 

Question # 8) What is the difference between HTML and PHP?

Answer # HTML is a language used to describe to a browser how to display text and other objects in a browser window. It is not a programming language. HTML works on a client computer (the system on which the page is being viewed). PHP is a scripting language, and can be used to create web pages written in HTML.

PHP Interview Questions And Answers

Question # 9) What are the advantages of using PHP?

Answer # Advantages of PHP Programming. PHP (Hypertext Pre-Processor) is a server-side web programming language that is widely used for web development. However, here are many languages which are used for web development or web programming. … PHP can run on both UNIX and Windows servers.

 

Question # 10) What is the difference between Python and PHP?

Answer # PHP is a language that’s made for the web. You can make GTK and CLI applications with PHP, but it’s mainly used for websites. Python is used for a lot of stuff like websites, webservers, game frameworks, desktop and CLI application, IDEs and a lot more. There’s also a huge difference in the syntax.

Basic PHP Interview Questions

Question # 11) Why do we use PHP?

Answer # A good benefit of using PHP is that it can interact with many different database languages including MySQL. We work with MySQL at Bluelinemedia since this is also a free language so it makes sense to use PHP. Both PHP and MySQL are compatible with an Apache server which is also free to license.

PHP Interview Questions And Answers

Question # 12) What is a session in PHP?

Answer # PHP 5 Sessions – A session is a way to store information (in variables) to be used across multiple pages. Unlike a cookie, the information is not stored on the users computer.

 

Question # 13) Why is Facebook still using PHP?

Answer # Facebook technology stack consist of application written in many language, including PHP and many others. Facebook still using PHP but it has built a compiler for it so it can be turned into native code on. Facebook doesn’t use PHP for its core system, at Facebook, they uses C++ heavily on back end system.

 

PHP Interview Questions And Answers For 1 Year Experience

 

Question # 14) How does PHP work?

Answer # The PHP software works with the web server, which is the software that delivers web pages to the world. You request a file, the web server happens to be running PHP, and it sends HTML back to the browser, thanks to the programming in PHP.

PHP Interview Questions And Answers

Question # 15) Can you use PHP and Javascript together?

Answer # So, when we develop web pages, we can have a combination of HTML, Javascript, CSS and PHP in our pages. If you need to use a scripting language, such as PHP, once the page has been loaded into the browser, then you must either refresh the page or use Ajax to request more processing at the server side.

 

Question # 16) Why do we use Javascript in PHP?

Answer # PHP is commonly written in-line in the same files as HTML and Javascript, PHP is a server-side language. Javascript is a client-side language. The main difference here is not PHP vs. JavaScript. It’s Client vs. Server. You can’t do server stuff on the client, and you can’t do all the Client stuff on the Server.

 

Question # 17) What is the main difference between asp net and PHP?

Answer # PHP is a programming language whereas ASP.NET is a programming framework. Websites developed by ASP.NET may use C#, but also other languages such as J#. ASP.NET is compiled whereas PHP is interpreted. ASP.NET is designed for windows machines, whereas PHP is platform free (and typically runs on Linux servers).

PHP Interview Questions And Answers

Question # 18) How does session work in PHP?

Answer # the session id is sent to the user when his session is created. it is stored in a cookie (called, by default, PHPSESSID ) that cookie is sent by the browser to the server with each request. the server (PHP) uses that cookie, containing the session_id, to know which file corresponds to that user.

 

Question # 19) How do you end a session in PHP?

Answer # If you want to explicitly end a user’s and delete their data without them having to close their browser, you need to clear the $_SESSION array, then use the session_destroy() function. Session_destroy() removes all session data stored on your hard disk, leaving you with a clean slate.

 

Question # 20) What are the advantages of PHP mysql?

Answer # It is a stable, reliable and powerful solution with advanced features like the following:

  • Data Security
  • On-Demand Scalability
  • High Performance
  • Round-the-clock Uptime
  • Comprehensive Transactional Support
  • Complete Workflow Control
  • Reduced Total Cost of Ownership
  • The Flexibility of Open Source

Core PHP Interview Questions

Question # 21) Is Java is better than PHP?

Answer # PHP and Java are both very similar when it comes to the benefits provided, but they are both very different. PHP is a server side scripting language, while Java is a client side choice. When you use PHP code, you will execute it in the actual server, while Java will be executed on your client’s computer.

PHP Interview Questions And Answers

Question # 22) How do I install PHP?

Answer # Here ie the Manual Installation Procedure

Step 1: download the files. Download the latest PHP 5 ZIP package from www.php.net/downloads.php

Step 2: extract the files

Step 3: configure php.ini

Step 4: add C:php to the path environment variable

Step 5: configure PHP as an Apache module

Step 6: test a PHP file

 

Question # 23) What is the use session in PHP?

Answer # This can be used to persist state information between page requests. Session IDs are normally sent to the browser via session cookies and the ID is used to retrieve existing session data. PHP will populate the $_SESSION superglobal with any session data after the session has started.

 

Question # 24) How long does a session last in PHP?

Answer # This is the one. The session will last for 1440 seconds (24 minutes).

 

Question # 25) What is the use of PHP and Mysql?

Answer # PHP is the most popular scripting language for web development. It is free, open source and server-side (the code is executed on the server). MySQL is a Relational Database Management System (RDBMS) that uses Structured Query Language (SQL).

 Latest PHP Interview Questions

Question # 26) Is jquery better than Javascript?

Answer # It may surprise you to learn that JavaScript and jQuery are actually the same thing. In a nutshell, jQuery is a set of JavaScript libraries that have been designed specifically to simplify HTML document traversing, animation, event handling, and Ajax interactions.

PHP Interview Questions And Answers

Question # 27) What is the difference between interpreted and compiled languages?

Answer # Java (interpreted) and C (or C++) (compiled) might have been a better example. Basically, compiled code can be executed directly by the computer’s CPU. The code of interpreted languages however must be translated at run-time from any format to CPU machine instructions. This translation is done by an interpreter.

 

Question # 28) How does cookies work in PHP?

Answer # A cookie is often used to identify a user. A cookie is a small file that the server embeds on the user’s computer. Each time the same computer requests a page with a browser, it will send the cookie too. With PHP, you can both create and retrieve cookie values.

 

Question # 29) How do I update PHP?

Answer # Changing the PHP Version:

  1. Log  into cPanel.
  2. Click the PHP Configuration button in the Software section.
  3.  Select the version of PHP you want to use from the dropdown.
  4. Click the Update button to save your php configuration.
  5.  Check your changes by viewing your settings in a phpinfo page.

 

Question # 30) What is the use of session and cookies in PHP?

Answer # A session is a global variable stored on the server. Each session is assigned a unique id which is used to retrieve stored values. Sessions have the capacity to store relatively large data compared to cookies. The session values are automatically deleted when the browser is closed.

 

Question # 31) What is in PHP 7?

Answer # Designed and refactored for today’s workloads, PHP 7 is the ultimate choice for web developers today. Get started now. Faster performance, less resources, and cool new features like scalar type declarations, the Spaceship Operator, anonymous classes, and more.

PHP Interview Questions And Answers

Question # 32) WHAT IS NULL value in PHP?

Answer # In the PHP world, apparantly uninitialized variables have the Null value, and is set on such a variable returns FALSE.

 

Question # 33) What is a trait in PHP?

Answer # Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies.

 

Question # 34) What is is_null() in PHP?

Answer # The is_null () function is used to test whether a variable is NULL or not. *Mixed : Mixed indicates that a parameter may accept multiple (but not necessarily all) types. Returns TRUE if var_name is null, FALSE otherwise.

PHP Interview Questions And Answers

Question # 35) What is the difference between null and empty?

Answer # An empty string is a value, but is just empty. Null is special to a database. Null has no bounds, it can be used for string , integer , date , etc. fields in a database. NULL isn’t allocated any memory, the string with NUll value is just a pointer which is pointing to nowhere in memory.

 

PHP Interview Questions And Answers For 2 Year Experience

 

Question # 36) What is a closure in PHP?

Answer # A closure is an object representation of an anonymous function. We can see that the anonymous function in the above code actually returns an object of closure which is assigned to and called using the variable $string. You can say closure is an object oriented way to use anonymous functions.

 

Question # 37) What is final in PHP?

Answer # PHP 5 introduces the final keyword, which prevents child classes from overriding a method by prefixing the definition with final. If the class itself is being defined final then it cannot be extended.

PHP Interview Questions And Answers

Question # 38) What is Var_dump?

Answer # The var_dump function displays structured information about variables/expressions including its type and value. Arrays are explored recursively with values indented to show structure. It also shows which array values and object properties are references.

 

Question # 39) What is the difference between null and undefined?

Answer # undefined means a variable has been declared but has not yet been assigned a value. On the other hand, null is an assignment value. It can be assigned to a variable as a representation of no value. Also, undefined and null are two distinct types: undefined is a type itself (undefined) while null is an object.

PHP Interview Questions And Answers

Question # 40) What is the use of callback in PHP?

Answer # PHP callback are functions that may be called dynamically by PHP. They are used by native functions such as array_map, usort, preg_replace_callback, etc. Here is a reminder of the various ways to create a callback function in PHP, and use it with the native functions.

Advanced PHP Interview Questions

Question # 41) What is a lambda function in PHP?

Answer # To sum up, a lambda function is an anonymous PHP function that can be stored in a variable and passed as an argument to other functions or methods. A closure is a lambda function that is aware of its surrounding context.

PHP Interview Questions And Answers

Question # 42) What is overriding in PHP?

Answer # Overloading is defining functions that have similar signatures, yet have different parameters. Overriding is only pertinent to derived classes, where the parent class has defined a method and the derived class wishes to override that method. In PHP, you can only overload methods using the magic method __call.

 

Question # 43) What is encapsulation in PHP?

Answer # Encapsulation is an OOP (Object Oriented Programming) concept in PHP. Wrapping some data in single unit is called Encapsulation. Second advantage of encapsulation is you can make the class read only or write only by providing setter or getter method. Capsule is best example of Encapsulation.

PHP Interview Questions And Answers

Question # 44) What is boolean in PHP?

Answer # PHP Booleans. A Boolean value is one that is in either of two states. They are known as True or False values, in programming. True is usually given a value of 1, and False is given a value of zero.

 

Question # 45) What is the use of Print_r function in PHP?

Answer # prinf : It is a function which takes atleast one string and format style and returns length of output string. print_r() is used for printing the array in human readable format. they both are language constructs. echo returns void and print returns 1.

 

Question # 46) What is the use of anonymous function in PHP?

Answer # Anonymous functions, also known as closures, allow the creation of functions which have no specified name. They are most useful as the value of callback parameters, but they have many other uses. Anonymous functions are implemented using the Closure class.

PHP Interview Questions And Answers

Question # 47) What is polymorphism in PHP?

Answer # Polymorphism is a long word for a very simple concept. Polymorphism describes a pattern in object oriented programming in which classes have different functionality while sharing a common interface.

 

Question # 48) What is the use of magic function in PHP?

Answer # PHP provides a number of ‘magic’ methods that allow you to do some pretty neat tricks in object oriented programming. These methods, identified by a two underscore prefix (__), function as interceptors that are automatically called when certain conditions are met.

PHP Interview Questions And Answers

Question # 49) What is the use of return in PHP?

Answer # (PHP 4, PHP 5, PHP 7) return returns program control to the calling module. Execution resumes at the expression following the called module’s invocation. If called from within a function, the return statement immediately ends execution of the current function, and returns its argument as the value of the function call.

 

Question # 50) What is the use of die in PHP?

Answer # The die() function prints a message and exits the current script. This function is an alias of the exit() function.

PHP Developer Interview Questions

Question # 51) What is an array in PHP?

Answer # PHP Arrays – An array is a data structure that stores one or more similar type of values in a single value. For example if you want to store 100 numbers then instead of defining 100 variables its easy to define an array of 100 length.

 

Question # 52) How to write comment in php?

Answer # Similiar to the HTML comment, the multi-line PHP comment can be used to comment out large blocks of code or writing multiple line comments. The multiple line PHP comment begins with ” /* ” and ends with ” */ “.

PHP Interview Questions And Answers

Question # 53) What is the difference between $message and $$message in PHP?

Answer # They are both variables. But $message is a variable with a fixed name. $$message is a variable who’s name is stored in $message. For example, if $message contains “var”, $$message is the same as $var.

 

Question # 54) What is the difference between require and include in PHP?

Answer # Require and include functions does the same task i.e. includes and evaluates specified file, but the difference is require will cause a fatal error when the specified file location is invalid or for any error where as include will generate a warning and continue the code execution.

 

PHP Interview Questions And Answers For 3 Year Experience

 

Question # 55) What are the different types of errors in PHP?

Answer # There are four types of errors in PHP.

  1. Warning errors
  2. Notice errors
  3. Fatal errors
  4. Parse errors

Question # 56) PHP Error Constants and their descriptions

Answer #

  1. E_ERROR: A fatal error that causes script termination
  2. E_WARNING: Run-time warning that does not cause script termination
  3. E_PARSE: Compile time parse error
  4. E_NOTICE: Run time notice caused due to error in code
  5. E_CORE_ERROR: Fatal errors that occur during PHP’s initial startup (installation)
  6. E_CORE_WARNING: Warnings that occur during PHP’s initial startup
  7. E_COMPILE_ERROR: Fatal compile-time errors indication problem with script
  8. E_USER_ERROR: User-generated error message
  9. E_USER_WARNING: User-generated warning message
  10. E_USER_NOTICE: User-generated notice message
  11. E_STRICT: Run-time notices
  12. E_RECOVERABLE_ERROR: Catchable fatal error indicating a dangerous error
  13. E_ALL: Catches all errors and warnings
  14. E_DEPRECATED
  15. E_USER_DEPRICATED

Question # 57) What is the use of Include_once in PHP?

Answer # The include_once statement includes and evaluates the specified file during the execution of the script. This is a behavior similar to the include statement, with the only difference being that if the code from a file has already been included, it will not be included again, and include_once returns TRUE .

PHP Interview Questions And Answers

Question # 58) What is Exception Handling in PHP?

Answer # With PHP 5 came a new object oriented way of dealing with errors. Exception handling is used to change the normal flow of the code execution if a specified error (exceptional) condition occurs. This condition is called an exception.

 

Question # 59) Why post method is used in PHP?

Answer # GET can’t be used to send binary data, like images or word documents, to the server. The data sent by GET method can be accessed using QUERY_STRING environment variable. The PHP provides $_GET associative array to access all the sent information using GET method. The POST method transfers information via HTTP headers.

PHP Interview Questions And Answers

Question # 60) What is the use of post in PHP?

Answer # When the user fills out the form above and clicks the submit button, the form data is sent for processing to a PHP file named “welcome.php”. The form data is sent with the HTTP POST method. To display the submitted data you could simply echo all the variables.

Senior PHP Developer Interview Questions And Answers

Question # 61) What is the difference between require_once and require in PHP?

Answer # require() includes and evaluates a specific file, while require_once() does that only if it has not been included before (on the same page). So, require_once() is recommended to use when you want to include a file where you have a lot of functions for example.

 

Question # 62) What is the use of die in PHP?

Answer # The die() function prints a message and exits the current script. This function is an alias of the exit() function.

 

Question # 63) How do you debug PHP?

Answer # To run a debugging session: Start the ide and open the file that contains the source code that you want to debug. Set a breakpoint at each line where you want the debugger to pause. To set a breakpoint, place the cursor at the beginning of a line and press Ctrl-F8/⌘-F8 or choose Debug > Toggle Line Breakpoint.

PHP Interview Questions And Answers

Question # 64) What is the meaning of xdebug?

Answer # Xdebug is a PHP extension which provides debugging and profiling capabilities. It uses the DBGp debugging protocol.

 

Question # 65) What is Chrome logger?

Answer # Chrome Logger is a Google Chrome extension for debugging server side applications in the Chrome console. Most languages include their own logging capabilities, but sometimes it is easier to see your logs right in the browser. Chrome Logger used to be known as ChromePHP.

PHP Developer Interview Questions And Answers For Experienced Candidates

Question # 66) What is the Phpstorm?

Answer # JetBrains PhpStorm is a commercial, cross-platform IDE for PHP built on JetBrains’ IntelliJ IDEA platform. PhpStorm provides an editor for PHP, HTML and JavaScript with on-the-fly code analysis, error prevention and automated refactorings for PHP and JavaScript code.

PHP Interview Questions And Answers

Question # 67) What is Zend Studio for?

Answer # Zend Studio is a commercial, proprietary integrated development environment (IDE) for PHP developed by Zend Technologies, based on the PHP Development Tools (PDT) plugin for the Eclipse platform (the PDT project is led by Zend). … Zend Studio is also integrated with Zend Framework.

 

Question # 68) What is urlencode and urldecode in php?

Answer # urlencode(string) — This PHP function is encodes a string to be used in a query part of a URL. URL encoding is used when placing text in a query string to avoid it being confused with the URL itself. It is normally used when the browser sends form data to a web server.

urldecode(string) – This PHP function id decodes any encoded value in the given string.

 

Question # 69) What is LAMP in PHP?

Answer # LAMP is a combination of Linux, Apache, MySQL and PHP.

PHP Interview Questions And Answers

Question # 70) What is the maximum size of a database in mysql?

Answer #

Operating System            File-size Limit

Win32 w/ FAT/FAT32      2GB/4GB

Win32 w/ NTFS 2TB (possibly larger)

Linux 2.2-Intel 32-bit      2GB (LFS: 4GB)

Linux 2.4+(using ext3 file system) 4TB

Solaris 9/10         16TB

MacOS X w/ HFS+            2TB

NetWare w/NSS file system        8TB

PHP Programming Questions

Question # 71) What is the maximum size of a table in MySQL?

Answer # You are using a MyISAM table and the space required for the table exceeds what is permitted by the internal pointer size. MyISAM permits data and index files to grow up to 256TB by default, but this limit can be changed up to the maximum permissible size of 65,536TB (2567 − 1 bytes).

 

Question # 72) What is the capacity of MySQL database?

Answer # Database Storage Capacity. MySQL is limited by the largest file size that the operating system you run it on can handle (between 4Gb and 256Tb depending on the O/S). With the innoDB table format you can even span multiple files with one table allowing for tables in the database of up to 64Tb.

PHP Interview Questions And Answers

Question # 73) How many records can be stored in MySQL table?

Answer # In InnoDB, with a limit on table size of 64 terabytes and a MySQL row-size limit of 65,535 there can be 1,073,741,824 rows. That would be minimum number of records utilizing maximum row-size limit. However, more records can be added if the row size is smaller.

 

Question # 74) How many columns can be added in a table in mysql?

Answer # MySQL 5.0 Column Count Limits: There is a hard limit of 4096 columns per table, but the effective maximum may be less for a given table. The exact limit depends on several interacting factors. Every table (regardless of storage engine) has a maximum row size of 65,535 bytes.

PHP Interview Questions And Answers

Question # 75) What is varchar mysql?

Answer # Values in VARCHAR columns are variable-length strings. The length can be specified as a value from 0 to 65,535. The effective maximum length of a VARCHAR is subject to the maximum row size (65,535 bytes, which is shared among all columns) and the character set used.

 PHP Programming Interview Questions

Question # 76) How big is varchar Max?

Answer # n defines the string length and can be a value from 1 through 8,000. max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size is the actual length of the data entered + 2 bytes. The ISO synonyms for varchar are charvarying or charactervarying.

 

Question # 77) Why triggers are used in mysql?

Answer # The MySQL trigger is a database object that is associated with a table. It will be activated when a defined action is executed for the table. The trigger can be executed when you run one of the following MySQL statements on the table: INSERT, UPDATE and DELETE and it can be invoked before or after the event.

PHP Interview Questions And Answers

Question # 78) How big is Nvarchar Max?

Answer # In Nvarchar “n” defines the string length and can be a value from 1 through 4,000. max indicates that the maximum storage size is 2^31-1 bytes (2 GB). The storage size, in bytes, is two times the actual length of data entered + 2 bytes. The ISO synonyms for nvarchar are national char varying and national character varying.

 

Question # 79) Why delimiter is used in mysql?

Answer # By default, mysql itself recognizes the semicolon as a statement delimiter, so you must redefine the delimiter temporarily to cause mysql to pass the entire stored program definition to the server. To redefine the mysql delimiter, use the delimiter command.

 

Question # 80) What is a stored procedure in mysql?

Answer # A procedure (often called a stored procedure) is a subroutine like a subprogram in a regular computing language, stored in database. A procedure has a name, a parameter list, and SQL statement(s). All most all relational database system supports stored procedure, MySQL 5 introduce stored procedure.

PHP Technical Interview Questions

Question # 81) What does a delimiter do in mysql?

Answer # delimiter is the marker for the end of each command you send to the mysql command line client. delimiter is not only related to triggers, but defining triggers and stored procedures is one strong use case as you wish them to contain semicolons (;) which are otherwise the default delimiter.

 

Question # 82) What is a definer in mysql?

Answer # All stored programs (procedures, functions, triggers, and events) and views can have a DEFINER attribute that names a MySQL account. If the DEFINER attribute is omitted from a stored program or view definition, the default account is the user who creates the object.

PHP Interview Questions And Answers

Question # 83) When should you use a stored procedure?

Answer # The benefits of using stored procedures in SQL Server rather than application code stored locally on client computers include: They allow modular programming. They allow faster execution. They can reduce network traffic.

 

Question # 84) What is the use of limit in mysql?

Answer # Limit Data Selections From a MySQL Database. MySQL provides a LIMIT clause that is used to specify the number of records to return. The LIMIT clause makes it easy to code multi page results or pagination with SQL, and is very useful on large tables. Returning a large number of records can impact on performance.

PHP Interview Questions And Answers

Question # 85) What is the use of dual table in mysql?

Answer # The DUAL table is a special one-row, one-column table present by default in Oracle and other database installations. In Oracle, the table has a single VARCHAR2(1) column called DUMMY that has a value of ‘X’. It is suitable for use in selecting a pseudo column such as SYSDATE or USER.

Advanced PHP Interview Questions

Question # 86) What is the use of inner join in mysql?

Answer # The MySQL INNER JOIN clause matches rows in one table with rows in other tables and allows you to query rows that contain columns from both tables. The INNER JOIN clause is an optional part of the SELECT statement.

 

Question # 87) What is the difference between an inner and outer join?

Answer # An inner join will only select records where the joined keys are in both specified tables. A left outer join will select all records from the first table, and any records in the second table that match the joined keys.

 

Question # 88) What is the use of offset in mysql?

Answer # Both MySQL and PostgreSQL support a really cool feature called OFFSET that is usually used with a LIMIT clause. The LIMIT clause is used to limit the number of results returned in a SQL statement.

PHP Interview Questions And Answers For 4 Year Experience

Question # 89) What is stdClass in PHP?

Answer # stdClass is a PHP generic empty class and stdClass is used to create the new Object.  stdClass is a kind of Object in Java or object in Python but not actually used as universal base class.

 

Question # 90) What are soundex() and metaphone() functions in PHP?

Answer # soundex and metaphone can be used to find strings that sound similar when pronounced out loud.

soundex() function calculates the soundex key of a string. A soundex key is a four character long alphanumeric strings that represents English pronunciation of a word.

metaphone() the metaphone() function calculates the metaphone key of a string. A metaphone key represents how a string sounds if pronounced by an English person.

PHP Interview Questions And Answers

Question # 91) How to parse configuration file in PHP?

Answer # The parse_ini_file() function parses a configuration (ini) file and returns the settings.

 

Question # 92) What is PSR in PHP?

Answer # The PHP Standard Recommendation (PSR) is a PHP specification published by the PHP Framework Interop Group. Similar to Java Specification Request for Java, it serves the standardization of programming concepts in PHP.

PHP Logical Interview Questions And Answers

Question # 93) What is Trait in PHP?

Answer # Traits are a mechanism for code reuse in single inheritance languages such as PHP. A Trait is intended to reduce some limitations of single inheritance by enabling a developer to reuse sets of methods freely in several independent classes living in different class hierarchies.

 

Question # 94) What is the difference between php traits vs interfaces?

Answer # The main difference is that, with interfaces, you must define the actual implementation of each method within each class that implements said interface, so you can have many classes implement the same interface but with different behavior, while traits are just chunks of code injected in a class.

PHP Interview Questions And Answers

Question # 95) Can you give example for Trait in PHP?

Answer #

<?php

trait ezcReflectionReturnInfo {

function getReturnType() { /*1*/ }

function getReturnDescription() { /*2*/ }

}

class ezcReflectionMethod extends ReflectionMethod {

use ezcReflectionReturnInfo;

/* … */

}

class ezcReflectionFunction extends ReflectionFunction {

use ezcReflectionReturnInfo;

/* … */

}

?>

 

Question # 96) How to get IP address of a server in PHP?

Answer # Try $_SERVER[‘SERVER_ADDR’] . It will be the IP address that the server is listening on. You can use DNS functions (e.g., gethostbyaddr() ) to get the host name.

 

Question # 97) Is there an easy way to delete an element from a PHP array?

Answer # If we want to delete just one array element you can use unset() method or alternative array_splice() method. Also if you have the value and don’t know the key to delete the element you can use array_search() method to get the key.

PHP Interview Questions And Answers For Experienced

Question # 98) Can you explain, when to use If-else if-else over switch statements?

Answer # If there is switching on the value of a single variable then switch is recommended every time. Otherwise, stick with multiple if-else statements.

 

Question # 99)  When do you use define() and when do you use const. What are the main differences between those two?

Answer # PHP 5.3 there are two ways to define constants: Either using the const keyword or using the  define() function:

const FOO = ‘BAR’;

define(‘FOO’, ‘BAR’);

The fundamental difference between those two ways is that const defines constants at compile time, whereas define() defines them at runtime. As const are language constructs and defined at compile time they are a bit faster than define().

PHP Interview Questions And Answers For 5 Year Experience

 

Question # 100) What is self in PHP?

Answer # In PHP self keyword is used to access static properties and methods.

 

Question # 101) What is $this?

Answer # It is the way to reference an instance of a class from within itself, the same as many other object-oriented languages.  $this refers to the class you are in. In PHP, the pseudo-variable $this is available when a method is called from within an object context.

PHP Interview Questions And Answers

Question # 102) When to use self over $this?

Answer # Use $this to refer to the current object. Use self to refer to the current class.

 

Question # 103) What is the difference between Apache and Tomcat?

Answer # Apache Tomcat is used to deploy your Java Servlets and JSPs. So in your Java project you can build your WAR (short for Web ARchive) file, and just drop it in the deploy directory in Tomcat. So basically Apache is an HTTP Server, serving HTTP. Tomcat is a Servlet and JSP Server serving Java technologies.

 

Question # 104) What is Nginx and what is it used for?

Answer # NGINX (Pronounced as Engine-X) is an open source, lightweight, high-performance web server or proxy server. Nginx used as reverse proxy server for HTTP, HTTPS, SMTP, IMAP, POP3 protocols, on the other hand, it is also used for servers load balancing and HTTP Cache.

PHP Interview Questions And Answers

Question # 105) Which is the best Web server?

Answer # There are different web servers available for different technologies.

LAMP: Linux, Apache, MySQL and PHP.

WIMP: Windows, IIS, MySQL/MS SQL Server and PHP.

WAMP: Windows, Apache, MySQL/MS SQL Server and PHP.

LEMP: Linux, NGINX, MySQL and PHP.

PHP Interview Questions And Answers For Experienced Candidates

Question # 106) What is the difference between Apache vs NIGINX?

Answer # The Apache HTTP server and NGINX are the two most popular open source web servers in the world today. The Apache web servers have been in use since 1995. Apache powers more websites than any other product. Because the open-source Apache web server has been available for so many years, and has so many users, lots of modules have been written to expand its functionality.

But Apache slows down under heavy load, because of the need to spawn new processes, thus consuming more computer memory. It also creates new threads that must compete with others for access to memory and CPU. Apache will also refuse new connections when traffic reaches the limit of processes configured by the administrator.

Nginx is an open source web server written to address some of the performance and scalability issues associated with Apache. The product is open source and free, but Nginx offers support if you buy its Nginx Plus version. Nginx is indeed event-based. They call their architecture “event-driven and asynchronous”. Apache relies on processes and threads.

PHP Interview Questions And Answers

Question # 107) What is .htaccess in PHP?

Answer # .htaccess is a configuration file for use on web servers running the Apache Web Server software. When a .htaccess file is placed in a directory which is in turn ‘loaded via the Apache Web Server’, then the .htaccess file is detected and executed by the Apache Web Server software.

 

Question # 108) What are advantages of .htaccess?

Answer # There are many advantages using .htaccess file in PHP:

  • URL redirecting
  • Managing error pages
  • Password Protection
  • Visitor blocking facilities by IP address
  • Setting Config variable and Environment variable

PHP Interview Questions And Answers

Question # 109) How to redirect a URL from http to https in .htaccess?

Answer # Using this below code, we can redirect a URL from http to https

RewriteEngine on

RewriteCond %{HTTPS} off

RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]

 

Question # 110) How to redirect https to http URL and vice versa in .htaccess?

Answer # Using this below code, we can redirect a URL from http to https

Redirect https to http

RewriteEngine On

RewriteCond %{HTTPS} on

RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Real Time PHP Interview Questions And Answers

Question # 111) What is a composer in PHP?

Answer # Composer is an application-level package manager for the PHP programming language that provides a standard format for managing dependencies of PHP software and required libraries.

 

Question # 112) What is PHP artisan?

Answer # Artisan is the name of the command-line interface included with Laravel. It provides a number of helpful commands for your use while developing your application. It is driven by the powerful Symfony Console component.

 

Question # 113) What is the difference between == and === in PHP?

Answers # The difference between the loosely == equal operator and the strict === identical operator is:

$a ==  $b │ Equal     │ TRUE if $a is equal to $b after type juggling.

$a === $b │ Identical │ TRUE if $a is equal to $b, and they are of the same type.

PHP Interview Questions And Answers

Question # 114) What is the output of the following PHP code?

Answers: $i = 012;

echo $i / 2;

Explanation: You might think that output for the above code is 6 right. That’s the wrong answer. But the correct output should be 5. The zero indicates at the beginning of a number as an octal number in PHP, so the number 012 evaluates to the decimal number 10 instead to decimal 12. Then the output should be 5.

MySQL Interview Questions And Answers For Experienced

Question # 115) What is SQL injection?

Answers # SQL injection (or a SQL injection attack) occurs when a user provides SQL code as user input for a Web page, and the SQL code is then executed in the database.

 

Question # 116) Why does SQL injection happen?

Answers # SQL injection is an attack technique that exploits a security vulnerability occurring in the database layer of an application . Hackers use injections to obtain unauthorized access to the underlying data, structure, and DBMS. It is one of the most common web application vulnerabilities.

PHP MYSQL Interview Questions And Answers

Question # 117) What is Mysql_real_escape_string used for?

Answers # In the case of MySQL this means: mysql_real_escape_string() calls MySQL’s library function mysql_real_escape_string, which prepends backslashes to the following characters: \x00, \n, \r, \, ‘, ” and \x1a.

 

Question # 118) What is input sanitization in PHP?

Answers # PHP filters are used to validate and sanitize external input. The PHP filter extension has many of the functions needed for checking user input, and is designed to make data validation easier and quicker.

 

Question # 119) What is the use of Stripslashes in PHP?

Answers # Definition and Usage. The stripslashes() function removes backslashes added by the addslashes() function. This function can be used to clean up data retrieved from a database or from an HTML form.

 

Question # 120) What is the use of Htmlspecialchars in PHP?

Answers # In many PHP legacy products the function htmlspecialchars($string) is used to convert characters like < and > and quotes a.s.o to HTML-entities.

 

Question # 121) What is the use of Addslashes in PHP?

Answers # Description. string addslashes ( string $str ) Returns a string with backslashes before characters that need to be escaped. These characters are single quote (‘), double quote (“), backslash (\) and NUL (the NULL byte).

PHP Interview Questions And Answers

Question # 122) What is XSS in PHP?

Answers # Cross-Site Scripting (abbreviated as XSS) is a class of security vulnerability whereby an attacker manages to use a website to deliver a potentially malicious JavaScript payload to an end user. XSS vulnerabilities are very common in web applications.

 

Question # 123) What is the use of isset in PHP?

Answers # isset() function. The isset () function is used to check whether a variable is set or not. If a variable is already unset with unset() function, it will no longer be set. The isset() function return false if testing variable contains a NULL value.

Real Time PHP Interview Questions And Answers

Question # 124) What is URL encoding and decoding in PHP?

Answers # urlencode(string)  This PHP function encodes a string to be used in a query part of a URL. urldecode(string) — This PHP function is decodes the query part of a URL string. URL encoding is used when placing text in a query string to avoid it being confused with the URL itself.

 

Question # 125) What is the use of trim in PHP?

Answers # The trim() function removes whitespace and other predefined characters from both sides of a string.

Related functions: ltrim() – Removes whitespace or other predefined characters from the left side of a string.

rtrim() – Removes whitespace or other predefined characters from the right side of a string.

PHP Interview Questions And Answers

Question # 126) What is the mysql injection?

Answers # MySQL injection refers to the act of someone inserting a MySQL statement to be run on your database without your knowledge. Injection usually occurs when you ask a user for input, like their name, and instead of a name they give you a MySQL statement that you will unknowingly run on your database.

 

Question # 127) What is the use of die in PHP?

Answers # The die() function prints a message and exits the current script. This function is an alias of the exit() function.

 

Question # 128) What does explode do in PHP?

Answers # You can also convert between strings and arrays by using the PHP implode and explode functions: implode implodes an array to a string, and explode explodes a string into an array.

PHP Interview Questions And Answers

Question # 129) What are the delimiters in PHP?

Answers # When using the PCRE functions, it is required that the pattern is enclosed by delimiters. A delimiter can be any non-alphanumeric, non-backslash, non-whitespace character. Often used delimiters are forward slashes (/), hash signs (#) and tildes (~).

 

Question # 130) Why Print_r is used in PHP?

Answers # print_r() is used for printing the array in human-readable format.

Scenario-Based PHP Interview Questions And Answers

Question # 131) What is Var_dump?

Answers # The var_dump function displays structured information about variables/expressions including its type and value.

 

Question # 132) What are the new features available in PHP 7?

Answers # New features from PHP 7 are:

  • Scalar type declarations – Scalar type declarations come in two flavors. One is coercive and the other one is strict.
  • Return type declarations
  • Null coalescing operator
  • Spaceship operator
  • Constant arrays using define()
  • Anonymous classes
  • Unicode codepoint escape syntax
  • Closure::call()

Question # 133) How do you define a constant in PHP?

Answers # A constant is an identifier (name) for a simple value. The value cannot be changed during the script. A valid constant name starts with a letter or underscore (no $ sign before the constant name).

PHP Interview Questions And Answers

Question # 134) What is Warning – “Cannot modify header information – headers already sent”?

Answers # In PHP when you output something (do an echo or print) if has to send the HTTP headers at that time. If you turn on output buffering you can output in the script but PHP doesn’t have to send the headers until the buffer is flushed. This will turn output buffering out without the need to call ob_start().

Accenture PHP Interview Questions And Answers

Question # 135) Explain about getters and setters in PHP?

Answers # “Getters” and “Setters” are object methods that allow you to control access to a certain class variables / properties. Sometimes, these functions are referred to as “mutator methods”. A “getter” allows to you to retrieve or “get” a given property. A “setter” allows you to “set” the value of a given property.

PHP Interview Questions And Answers

Question # 136) What are majic methords in PHP?

Answers # PHP provides a number of ‘magic’ methods that allow you to do some pretty neat tricks in object oriented programming. These methods, identified by a two underscore prefix (__), function as interceptors that are automatically called when certain conditions are met.

Give me some examples of majix methods?

__construct()

The __construct() method is by far the most commonly used magic method. This is where you do any initialization you need when an object is created.

__destruct()

The __destruct() method is called when the object is destroyed. It accepts no arguments and is commonly used to perform any cleanup operations such as closing a database connection.

__get()

The __get() method is called when code attempts to access a property that is not accessible. It accepts one argument, which is the name of the property. It should return a value, which will be treated as the value of the property.

__set()

The __set() method is called when code attempts to change the value a property that is not accessible. It accepts two arguments, which are the name of the property and the value.

__isset()

The __isset() method is called when code calls isset() on a property that is not accessible. It accepts one argument, which is the name of the property. It should return a Boolean value representing the existence of a value.

__unset()

The __unset() method is called when code attempts to unset() a property that is not accessible. It accepts one argument, which is the name of the property.

__toString()

The __toString() method is called when code attempts to treat an object like a string. It accepts no arguments and should return a string.

__set_state()

The static __set_state() method is called when the var_export() function is called on our object.

__clone()

The __clone() method can be used to solve this problem. It is called on the copy of a cloned object after cloning takes place.

__sleep()

The __sleep() method is called when the serialize() function is called on the object. It accepts no arguments and should return an array of all properties that should be serialized.

__wakeup()

The __wakeup() method is called when the unserialize() function is called on the stored object. It accepts no arguments and does not need to return anything. Use it to reestablish any database connection.

__call()

The __call() is called when code attempts to call inaccessible or nonexistent methods. It accepts two arguments: the name of the called method and an array of arguments.

__callStatic()

The __callStatic() (available as of PHP version 5.3) is identical to __call() except that it is called when code attempts to call inaccessible or nonexistent methods in a static context.

__invoke()

The __invoke() is called when code tries to use the object as a function. Any arguments defined in this method will be used as the function arguments.

__autoload()

This is not a magic method, but it is still very useful. The __autoload() function is automatically called when a class that doesn’t exist is referenced.

Coding compiler hope that these 136 PHP interview questions and answers for freshers and 1 2 3 4 5 years experienced professionals will help you to crack your next PHP job interview. If you know any other PHP technical interview questions, please write in below comment box, these PHP questions will be helpful for fellow PHP professionals.

RELATED INTERVIEW QUESTIONS

  1. Kubernetes Interview Questions
  2. Docker Interview Questions
  3. CEH Interview Questions
  4. CyberArk Interview Questions
  5. Appian Interview Questions
  6. Drools Interview Questions
  7. Talend Interview Questions
  8. Selenium Interview Questions
  9. Ab Initio Interview Questions
  10. AB Testing Interview Questions
  11. Mobile Application Testing Interview Questions
  12. Pega Interview Questions
  13. UI Developer Interview Questions
  14. Tableau Interview Questions
  15. SAP ABAP Interview Questions
  16. Reactjs Interview Questions
  17. UiPath Interview Questions
  18. Automation Anywhere Interview Questions
  19. RPA Interview Questions
  20. RPA Blue Prism Interview Questions
  21. Ranorex Interview Questions
  22. AWS Interview Questions
  23. SSRS Interview Questions
  24. SQL Interview Questions
  25. Informatica MDM Interview Questions
  26. CyberArk Interview Questions
  27. SAP SD Interview Questions
  28. SAP EWM Interview Questions
  29. Advanced Javascript Interview Questions
  30. Angular 2 Interview Questions

Kubernetes Interview Questions And Answers 2018

Kubernetes Interview Questions And Answers 2018. If you are looking for Docker Kubernetes Devops Interview Questions, here in this article Coding compiler sharing 31 interview questions on Kubernetes. These Kubernetes questions will help you to crack your next Kubernetes job interview. All the best for your future and happy learning.

Kubernetes Interview Questions

  1. What is the Kubernetes?
  2. What is Kubernetes and how to use it?
  3. What is the meaning of Kubernetes?
  4. What is a docker?
  5. What is orchestration in software?
  6. What is a cluster in Kubernetes?
  7. What is a swarm in Docker?
  8. What is Openshift?
  9. What is a namespace in Kubernetes?
  10. What is a node in Kubernetes?
  11. What is Docker and what does it do?
  12. What is a Heapster?
  13. Why do we use Docker?
  14. What is a docker in cloud?
  15. What is the Kubelet?
  16. What is Minikube?
  17. What is Kubectl?
  18. What is the Gke?
  19. What is k8s?
  20. What is KUBE proxy?

Kubernetes Interview Questions And Answers

Kubernetes Interview Questions
Kubernetes is anOpen source software
Kubernetes is aSystem for automating deployment, scaling and management of containerized applications
Kubernetes wasOriginally designed by Google and now maintained by the Cloud Native Computing Foundation.
Kubernetes canIt aims to provide a platform for automating deployment, scaling, and operations of application containers.
Kubernetes developed byGoogle
Kubernetes LicenseApache License 2.0
Kubernetes has written inGo Programming
 
Kubernetes Interview Question # 1) What is the Kubernetes?

A) Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications. It groups containers that make up an application into logical units for easy management and discovery. 

 

Kubernetes Interview Question # 2) What is Kubernetes and how to use it?

A) Kubernetes is an open-source platform designed to automate deploying, scaling, and operating application containers. With Kubernetes, you are able to quickly and efficiently respond to customer demand: Deploy your applications quickly and predictably.

 

Kubernetes Interview Question # 3) What is the meaning of Kubernetes?

A) Kubernetes (commonly referred to as “K8s”) is an open-source system for automating deployment, scaling and management of containerized applications that was originally designed by Google and donated to the Cloud Native Computing Foundation.

Docker Kubernetes Interview Questions For Experienced

Kubernetes Interview Question # 4) What is a docker?

A) Docker container is an open source software development platform. Its main benefit is to package applications in “containers,” allowing them to be portable among any system running the Linux operating system (OS).

 

Kubernetes Interview Question # 5) What is orchestration in software?

A) Application Orchestration. Application or service orchestration is the process of integrating two or more applications and/or services together to automate a process, or synchronize data in real-time. Often, point-to-point integration may be used as the path of least resistance.

 

Kubernetes Questions # 6) What is a cluster in Kubernetes?

A) These master and node machines run the Kubernetes cluster orchestration system. A container cluster is the foundation of Container Engine: the Kubernetesobjects that represent your containerized applications all run on top of a cluster.

 

Interview Questions on Kubernetes # 7) What is a swarm in Docker?

A) Docker Swarm is a clustering and scheduling tool for Docker containers. With Swarm, IT administrators and developers can establish and manage a cluster ofDocker nodes as a single virtual system.

 

Kubernetes Openshift Interview Question # 8) What is Openshift?

A) OpenShift Online is Red Hat’s public cloud application development and hosting platform that automates the provisioning, management and scaling of applications so that you can focus on writing the code for your business, startup, or big idea.

Advanced Kubernetes Interview Questions

Docker and Kubernetes Interview Question # 9) What is a namespace in Kubernetes?

A) Namespaces are intended for use in environments with many users spread across multiple teams, or projects. Namespaces are a way to divide cluster resources between multiple uses (via resource quota). In future versions of Kubernetes, objects in the same namespace will have the same access control policies by default.

 

Kubernetes Interview Question # 10) What is a node in Kubernetes?

A) A node is a worker machine in Kubernetes, previously known as a minion. A nodemay be a VM or physical machine, depending on the cluster. Each node has the services necessary to run pods and is managed by the master components. The services on a node include Docker, kubelet and kube-proxy.

 

Kubernetes Interview Question # 11) What is Docker and what does it do?

A) Docker is a tool designed to make it easier to create, deploy, and run applications by using containers. Containers allow a developer to package up an application with all of the parts it needs, such as libraries and other dependencies, and ship it all out as one package.

 

Kubernetes Interview Question # 12) What is a Heapster?

A) Heapster is a cluster-wide aggregator of monitoring and event data. It supports Kubernetes natively and works on all Kubernetes setups, including our Deis Workflow setup.

 

Kubernetes Interview Question # 13) Why do we use Docker?

A) Docker provides this same capability without the overhead of a virtual machine. It lets you put your environment and configuration into code and deploy it. The same Docker configuration can also be used in a variety of environments. This decouples infrastructure requirements from the application environment.

 

Kubernetes Interview Question # 14) What is a docker in cloud?

A) A node is an individual Linux host used to deploy and run your applications. Docker Cloud does not provide hosting services, so all of your applications, services, and containers run on your own hosts. Your hosts can come from several different sources, including physical servers, virtual machines or cloud providers.

 

Kubernetes Interview Question # 15) What is a cluster of containers?

A) A container cluster is a set of Compute Engine instances called nodes. It also creates routes for the nodes, so that containers running on the nodes can communicate with each other. The Kubernetes API server does not run on your cluster nodes. Instead, Container Engine hosts the API server.

Real-Time Kubernetes Scenario Based Interview Questions

Kubernetes Interview Questions # 16) What is the Kubelet?

A) Kubelets run pods. The unit of execution that Kubernetes works with is the pod. A pod is a collection of containers that share some resources: they have a single IP, and can share volumes.

 

Kubernetes Interview Questions # 17) What is Minikube?

A) Minikube is a tool that makes it easy to run Kubernetes locally. Minikube runs a single-node Kubernetes cluster inside a VM on your laptop for users looking to try out Kubernetes or develop with it day-to-day.

 

Kubernetes Interview Questions # 18) What is Kubectl?

A) kubectl is a command line interface for running commands against Kubernetes clusters. This overview covers kubectl syntax, describes the command operations, and provides common examples. For details about each command, including all the supported flags and subcommands, see the kubectl reference documentation.

 

Kubernetes Interview Questions # 19) What is the Gke?

A) Google Container Engine (GKE) is a management and orchestration system for Docker container and container clusters that run within Google’s public cloud services. Google Container Engine is based on Kubernetes, Google’s open source container management system.

 

Kubernetes Interview Questions # 20) What is k8s?

A) Kubernetes, also sometimes called K8S (K – eight characters – S), is an open source orchestration framework for containerized applications that was born from the Google data centers.

 

Kubernetes Interview Questions # 21) What is KUBE proxy?

A) Synopsis. The Kubernetes network proxy runs on each node. Service cluster ips and ports are currently found through Docker-links-compatible environment variables specifying ports opened by the service proxy. There is an optional addon that provides cluster DNS for these cluster IPs.

 

Kubernetes Interview Questions # 22) Which process runs on Kubernetes master node?

A) Kube-apiserver process runs on Kubernetes master node.

 

Kubernetes Interview Questions # 23) Which process runs on Kubernetes non-master node?

A) Kube-proxy process runs on Kubernetes non-master node.

 

Kubernetes Interview Questions # 24) Which process validates and configures data for the api objects like pods, services?

A) kube-apiserver process validates and configures data for the api objects.

 

Kubernetes Interview Questions # 25) What is the use of kube-controller-manager?

A) kube-controller-manager embeds the core control loop which is a non-terminating loop that regulates the state of the system.

 

Kubernetes Interview Questions # 26) Kubernetes objects made up of what?

A) Kubernetes objects are made up of Pod, Service and Volume.

 

Kubernetes Interview Questions # 27) What are Kubernetes controllers?

A) Kubernetes controllers are Replicaset, Deployment controller.

 

Kubernetes Interview Questions # 28) Where Kubernetes cluster data is stored?

A) etcd is responsible for storing Kubernetes cluster data.

 

Kubernetes Interview Questions # 29) What is the role of kube-scheduler?

A) kube-scheduler is responsible for assigning a node to newly created pods.

 

Kubernetes Interview Questions # 30) Which container runtimes supported by Kubernetes?

A) Kubernetes supports docker and rkt container runtimes.

 

Kubernetes Interview Questions # 31) What are the components interact with Kubernetes node interface?

A) Kubectl, Kubelet, and Node Controller components interacts with Kubernetes node interface.

RELATED INTERVIEW QUESTIONS

  1. Docker Interview Questions
  2. CEH Interview Questions
  3. CyberArk Interview Questions
  4. Appian Interview Questions
  5. Drools Interview Questions
  6. Talend Interview Questions
  7. Selenium Interview Questions
  8. Ab Initio Interview Questions
  9. AB Testing Interview Questions
  10. Mobile Application Testing Interview Questions
  11. Pega Interview Questions
  12. UI Developer Interview Questions
  13. Tableau Interview Questions
  14. SAP ABAP Interview Questions
  15. Reactjs Interview Questions
  16. UiPath Interview Questions
  17. Automation Anywhere Interview Questions
  18. RPA Interview Questions
  19. RPA Blue Prism Interview Questions
  20. Ranorex Interview Questions
  21. AWS Interview Questions
  22. SSRS Interview Questions
  23. SQL Interview Questions
  24. Informatica MDM Interview Questions
  25. CyberArk Interview Questions
  26. SAP SD Interview Questions
  27. SAP EWM Interview Questions
  28. Advanced Javascript Interview Questions
  29. Angular 2 Interview Questions
  30. Advanced Java Interview Questions

Advanced CEH Interview Questions And Answers

47 CEH Interview Questions and Answers For Experienced 2018. If you are searching for Certified Ethical Hacker interview questions, this article will help you with 47 real-time scenario based CEH certification exam questions to crack your next Ethical hacker job interview. Coding compiler wishing you all the very best for your future and happy learning.

CEH Interview Questions

What is Ethical Hacking and an Ethical Hacker?

Ethical hacking and ethical hacker are terms used to describe hacking performed by a company or individual to help identify potential threats on a computer or network. An ethical hacker attempts to bypass system security and search for any weak points that could be exploited by malicious hackers.

Ethical hacking refers to the act of locating weaknesses and vulnerabilities of computer and information systems by duplicating the intent and actions of malicious hackers. Ethical hacking is also known as penetration testing, intrusion testing, or red teaming.

What are the tools used for ethical hacking?

These are the few tools used for ethical hacking.

  1. Metasploit
  2. Acunetix is a web vulnerability scanner (WVS) that scans and finds out the flaws in a website that could prove fatal.
  3. Nmap.
  4. Wireshark.
  5. oclHashcat.
  6. Nessus Vulnerability Scanner.
  7. Maltego.

Why is ethical hacking so important?

As opposed to malicious “black hat” hacking, ethical “white hat” hacking (also called penetration testing) involves using computer hacking skills to identify network security vulnerabilities and patch security holes before anyone can abuse them.

What are the stages of ethical hacking?

Here is a brief overview of the five phases of penetration testing (ethical hacking):

Phase 1 | Reconnaissance. Reconnaissance is the act of gathering preliminary data or intelligence on your target.
Phase 2 | Scanning.
Phase 3 | Gaining Access.
Phase 4 | Maintaining Access.
Phase 5 | Covering Tracks.

What are the types of hacking?

Types of Hacking are,

  • Website Hacking
  • Network Hacking
  • Ethical Hacking
  • Email Hacking
  • Password Hacking
  • Online Banking Hacking
  • Computer Hacking

What is Website Hacking?

Hacking a website means taking control from the website owner to a person who hacks the website.

What is Network Hacking?

Network Hacking is generally means gathering information about domain by using tools like Telnet, Ns look UP, Ping, Tracert, Netstat, etc… over the network.

Certified Ethical Hacker Interview Questions

What is Ethical Hacking?

Ethical hacking is where a person hacks to find weaknesses in a system and then usually patches them.

What is Email Hacking?

Email hacking is illicit access to an email account or email correspondence.

What is Password Hacking?

Password Hacking Password cracking is the process of recovering secret passwords from data that has been stored in or transmitted by a computer system.

What is Online Banking Hacking?

Online banking Hacking Unauthorized accessing bank accounts without knowing the password or without permission of account holder is known as Online banking hacking.

What is Computer Hacking?

Computer Hacking is when files on your computer are viewed, created, or edited without your authorization.

What is footprinting in hacking?

Footprinting is the first and most convenient way that hackers use to gather information. about computer systems and the companies they belong to. The purpose of footprinting to. learn as much as you can about a system, it’s remote access capabilities, its ports and. services, and the aspects of its security.

What is scanning in ethical hacking?

After footprinting and reconnaissance, scanning is the second phase of information gathering that hackers use to size up a network. Scanning is where they dive deeper into the system to look for valuable data and services in a specific IP address range.

What is Cowpatty?

coWPAtty Package Description. Implementation of an offline dictionary attack against WPA/WPA2 networks using PSK-based authentication (e.g. WPA-Personal). Cowpatty can implement an accelerated attack if a precomputed PMK file is available for the SSID that is being assessed.

Which programming language is used for hacking?

It’s best, actually, to learn all five of Python, C/C++, Java, Perl, and LISP. Besides being the most important hacking languages, they represent very different approaches to programming, and each will educate you in valuable ways.

Certified Ethical Hacker Practice Questions

Why is python used for hacking?

Most widely used scripting language for hackers is Python. Python has some important features that make it particularly useful for hacking, but probably most importantly, it has some pre-built libraries that provide some powerful functionality.

What programs do you use to hack?

Metasploit
Metasploit by Rapid 7.
Nessus Vulnerability Scanner.
Cain and Able Hacking software.
Kali Linux Penetration software.
Hydra Hacking software.

What are the types of hacking attacks?

Here are the some important hacking techniques that are commonly used to get your personal information in an unauthorized way.
Keylogger.
Denial of Service (DoS\DDoS)
Waterhole attacks.
Fake WAP.
Eavesdropping (Passive Attacks)
Phishing.
Virus, Trojan etc.
ClickJacking Attacks.

What are three types of hackers?

The three types of hackers are the white hat hacker, the grey hat hacker, and the black hat hacker. Each type of hacker hacks for a different reason, a cause, or both.

Which operating system is best for hacking?

  1. Kali Linux: Developed by Offensive Security as the rewrite of BackTrack, Kali Linux distro tops our list of the best operating systems for hacking purposes.
  2. Parrot Security OS
  3. BackBox
  4. Samurai Web Testing Framework
  5. Pentoo Linux
  6. DEFT Linux
  7. Caine
  8. Network Security Toolkit (NST)

What are the types of cyber attacks?

Let’s examine eight of the most common cyber attacks that your business could face and ways to avoid them.

  • Malware.
  • Phishing.
  • Password Attacks.
  • Denial-of-Service (DoS) Attacks.
  • “Man in the Middle” (MITM)
  • Drive-By Downloads.
  • Malvertising.
  • Rogue Software.

Information Security Interview Questions And Answers

What is a script kitty?

In programming and hacking culture, a script kiddie or skiddie is an unskilled individual who uses scripts or programs developed by others to attack computer systems and networks and deface websites.

What is a blue hat hacker?

A blue hat hacker is someone outside computer security consulting firms who bug tests a system prior to its launch, looking for exploits so they can be closed. Blue Hat Hacker also refers to the security professional invited by Microsoft to find vulnerabilities in Windows.

What is cyber attacks with examples?

A cyberattack is any type of offensive manoeuvre employed by nation-states, individuals, groups, or organizations that targets computer information systems, infrastructures, computer networks, and/or personal computer devices by various means of malicious acts usually originating from an anonymous source.

What are the types of password attacks?

  • Guessing. Simple, repeated attempts using common passwords or known facts about the user.
  • Stealing. Physically or electronically acquiring a users password – can include sniffing of network communications.
  • Dictionary Attack.
  • Brute Force Attack.
  • Rainbow Tables.
  • Hybrid Password Attack.
  • Birthday Attack.

What is a gray hat hacker?

The term “grey hat”, “greyhat” or “gray hat” (gureihato) refers to a computer hacker or computer security expert who may sometimes violate laws or typical ethical standards, but does not have the malicious intent typical of a black hat hacker.

What is a Cyberextortionist?

Cyberextortion is a crime involving an attack or threat of attack coupled with a demand for money to avert or stop the attack. Cyberextortion can take many forms.

What is the white hat hacker?

The term “white hat” in Internet slang refers to an ethical computer hacker, or a computer security expert, who specializes in penetration testing and in other testing methodologies to ensure the security of an organization’s information systems.

What is a brute force hack?

Brute force (also known as brute force cracking) is a trial and error method used by application programs to decode encrypted data such as passwords or Data Encryption Standard (DES) keys, through exhaustive effort (using brute force) rather than employing intellectual strategies.

What can an ethical hacker do?

An ethical hacker is a computer and networking expert who systematically attempts to penetrate a computer system or network on behalf of its owners for the purpose of finding security vulnerabilities that a malicious hacker could potentially exploit.

Top Ethical Hacking Interview Questions

What is meant by spoofing attack?

A spoofing attack is when a malicious party impersonates another device or user on a network in order to launch attacks against network hosts, steal data, spread malware or bypass access controls. There are several different types of spoofing attacks that malicious parties can use to accomplish this.

What are the different types of spoofing?

Types of Spoofing Attacks
ARP Spoofing Attack. The Address Resolution Protocol (ARP) is a protocol used to translate IP addresses into Media Access Control (MAC) addresses in order to be properly transmitted.
DNS Spoofing Attack.
IP Spoofing Attack.

What is difference between sniffing and spoofing?

To start with, there are two common types of Internet security breaches, sniffing and spoofing. *Sniffing is the act of intercepting and inspecting data packets using sniffers (Software or hardware devices) over the Net. On the other hand, *Spoofing is the act of identity impersonation.

What is footprinting in hacking?

Footprinting is the first and most convenient way that hackers use to gather information. about computer systems and the companies they belong to. The purpose of footprinting to. learn as much as you can about a system, it’s remote access capabilities, its ports and. services, and the aspects of its security.

What is footprinting in ethical hacking?

Footprinting (also known as reconnaissance) is the technique used for gathering information about computer systems and the entities they belong to. To get this information, a hacker might use various tools and technologies. This information is very useful to a hacker who is trying to crack a whole system.

What is the difference between phishing and spoofing?

Phishing and spoofing are clearly different beneath the surface. One downloads malware to your computer or network, and the other tricks you into giving up sensitive financial information to a cyber crook. Phishing is a method of retrieval, while spoofing is a means of delivery.

What is reconnaissance in the world of hacking?

The process of collecting information about an intended target of a malicious hack by probing the target system. Active reconnaissance typically involves port scanning in order to find weaknesses in the target system (i.e., which ports are left vulnerable and/or if there are ways around the firewall and routers).

What is active and passive reconnaissance?

Passive reconnaissance is an attempt to gain information about targeted computers and networks without actively engaging with the systems. In active reconnaissance, in contrast, the attacker engages with the target system, typically conducting a port scan to determine find any open ports.

What is enumeration in hacking?

Network enumeration is a computing activity in which usernames and info on groups, shares, and services of networked computers are retrieved. It should not be confused with network mapping, which only retrieves information about which servers are connected to a specific network and what operating system runs on them.

Real-Time Ethical Hacking Scenario Based Interview Questions

What is network enumeration?

Network Enumeration is the discovery of hosts/devices on a network, they tend to use overt discovery protocols such as ICMP and SNMP to gather information, they may also scan various ports on remote hosts for looking for well known services in an attempt to further identify the function of a remote host.

What is a banner grab?

Banner grabbing is a technique used to glean information about a computer system on a network and the services running on its open ports. Administrators can use this to take inventory of the systems and services on their network.

What is operating system fingerprinting?

OS fingerprinting is the process of determining the operating system used by a host on a network.

What is a TCP IP fingerprint?

TCP/IP stack fingerprinting is the passive collection of configuration attributes from a remote device during standard layer 4 network communications. The combination of parameters may then be used to infer the remote machine’s operating system (aka, OS fingerprinting), or incorporated into a device fingerprint.

Why is ethical hacking so important?

As opposed to malicious “black hat” hacking, ethical “white hat” hacking (also called penetration testing) involves using computer hacking skills to identify network security vulnerabilities and patch security holes before anyone can abuse them.

Who are the best hacker in the world today?

Here is the list of top hackers.

  1. Gary McKinnon.
  2. LulzSec.
  3. Adrian Lamo.
  4. Mathew Bevan and Richard Pryce.
  5. Jonathan James.
  6. Kevin Poulsen.
  7. Kevin Mitnick.
  8. Anonymous.

RELATED INTERVIEW QUESTIONS

  1. CyberArk Interview Questions
  2. Appian Interview Questions
  3. Drools Interview Questions
  4. Talend Interview Questions
  5. Selenium Interview Questions
  6. Ab Initio Interview Questions
  7. AB Testing Interview Questions
  8. Mobile Application Testing Interview Questions
  9. Pega Interview Questions
  10. UI Developer Interview Questions
  11. Tableau Interview Questions
  12. SAP ABAP Interview Questions
  13. Reactjs Interview Questions
  14. UiPath Interview Questions
  15. Automation Anywhere Interview Questions
  16. RPA Interview Questions
  17. RPA Blue Prism Interview Questions
  18. Ranorex Interview Questions
  19. AWS Interview Questions
  20. SSRS Interview Questions
  21. SQL Interview Questions
  22. Informatica MDM Interview Questions
  23. CyberArk Interview Questions
  24. SAP SD Interview Questions
  25. SAP EWM Interview Questions
  26. Advanced Javascript Interview Questions
  27. Angular 2 Interview Questions
  28. AngularJS Interview Questions
  29. Accenture Java Interview Questions
  30. Advanced Java Interview Questions