Category Archives: Programming

Articles and Interview Questions,Tips related to Programming – Interview Sortout

Difference Between Java and Java Script

Since “Java” is common that creates lots of confusion to those who are not familiar with programming languages or non technical persons. Both are different and they have their own usability. We can’t compare.

Java and Java Script are different things. JavaScript(JS) is not similar or related to Java.

Just like a Car and a Bike we can’t compare. They have different features and they are used for different purposes. They may have few similarities like Transportation, Fuel Requirement, Speed etc. But that doesn’t mean a Car can replace bike or a Bike can replace a car.

Being more clear we can’t say that a This XYZ bike is better that ABC car.

But we can compare a Bike with another bike, a car with another car.

In the same way we can’t compare Java and Java Script.

Lets Know about the Java

Java is a full fledged and completely developed programming language. It is the most popular programming language and Software or Applications developed using Java are known as most secured applications.

Java can be used for different purposes like:

  • System Software
  • Web Applications and Websites
  • Mobile Based Applications
  • Game Development

Main Features of Java:

  • Compiled
  • Object Oriented Programming Language
  • Platform Independent
  • Java promised, “Write Once, Run Anywhere”.

Lets Know about the Java Script

JavaScript is Evolved as the most popular and Powerful tool in Game Development and In Web development.
JavaScript is known as Light Weight Programming language or Scripting Language.
It can be used in HTML text and run on browser.
It is used to manipulate DOM tree and to Capture the events of HTML elements.


  1. Java is an object oriented programming language where as JavaScript is an object based scripting language.
  2. Java is multi threading programming language where as JavaScript is not.
  3. Java program needs huge memory, Java Script is very light weight.
  4. Java is a Standalone language and is enough to develop many types of software where as JavaScript embedded within a web page and integrates with its HTML DOM elements.
Spread the love

Coding vs Programming

Some of the folks claim that ‘Coding is not the same as programming. Just because you are a coder does not mean you are a programmer too. 


Coding in  Not Programming and Programming is Not Coding?

What is Coding?

Coding is basically the act of translating code from human language to a machine-based language.It is commonly known that computer processors only understand the language of ones and zeros and our natural language is completely different from this binary language.

Depending on the programming language, effective coding requires some skills. In order to become a coder, you need to be able to write code in different programming languages such as Python, Java, C and so on. 

With this knowledge you will be able to provide instructions and information to the computer to make it execute the programs you or your team creates.

Coding involves writing code for creating a software program. Any sort of application, website, or game is a program.Depending on the programming language, effective coding requires some skills

What is programming?

While coding is a big part of software development, it is not the most important part. To create a product, you need to take several additional steps.

Programming is the process of developing an executable software program that is implemented without any errors. It is the programmer’s job to analyse a problem in the code and provide solutions.

In order to come up with an application you will need to carry out a few steps including:

  • Planning the application
  • Designing it
  • Testing its features
  • Deploying it
  • Maintaining it after it’s finished

So it’s only fair to say that programming not only deals with coding but also implementing algorithms and much more.

The Differences Between Coding and Programming

  • Coding is a part of programming that deals with writing code that a machine can translate. Programming is the process of creating a program that follows certain standards and performs a certain task.
  • Coders should have basic knowledge of programming languages and their syntax and keywords.
  • Programmers should have experience creating algorithms, modelling problems, processing data, and managing projects – these are just some of the practical skills needed. Programmers also apply their imagination and analytical skills to help them solve specific problems.
  • Coding requires basic knowledge of a programming language. If you want to program, you’d need to understand much more. Like how to create algorithms and maths models, how to process data, know maths, and in some cases, event management experience.
  • Creating code is the beginning steps, and then programming is used to analyse and implement the same and produce the proper machine level output. It also involves all the critical parameters from debugging and compiling to testing and implementation.
Spread the love

Skills that Every PHP Developer Must-Have

The popular scripting language PHP, has been in the market for 25 years. Like Python, PHP is also a programming language developed by Rasmus Lerdorf as his side project in the 1990s. 

Although language usage may have been declining over the years, Stack Overflow has shown that PHP is still among the top ten scripting, programming, and markup languages ​​available.

It is used by major websites such as Facebook and Wikipedia and the world’s most significant open-source projects, such as Drupal and WordPress.

PHP development is trendy now, and many freelancers are involved in PHP development. You may be curious to know about How to become a PHP Developer? But If you want to be a successful independent PHP developer, you need to understand more than just PHP. Here are six essential skills you need to succeed as a PHP developer.

Knowledge of Other Programming Languages

If you want to stand out as a PHP developer in the highly competitive job market, it is not enough to understand PHP code. A strong understanding of front-end programming languages ​​such as JavaScript, HTML, and CSS is essential for finding and fixing web design errors.

Familiarity with these languages ​​will also help you better understand how they affect the ultimate goal of most programming projects (which is the user experience).

Understanding the database (primarily MySQL but common alternatives such as Oracle and PostgreSQL) is also essential. In short, acquiring and maintaining comprehensive technical skills is a meaningful way to become a valuable development team member.

Good Communication

You can be a genius with PHP code, but if you do not know how to communicate with others, it can be challenging to work effectively on a team project.

You need to be able to talk to your clients, bosses, and colleagues to understand your project or business goals, ask questions and describe how your work fits into a broader range of products.

Remember that even if you are most comfortable when behind a screen, good communication requires speaking over the phone, through video conference, or in person, as well as through messaging apps and email.

Problem Solving Skills

Learning the “hard” technical skills is one aspect of becoming a leading PHP developer, but you cannot be at the top without the right combination of “soft” skills.

One of them is problem-solving, which is the foundation of all web development. PHP developers face unexpected problems that need to be solved. How you address these problems plays a vital role in the value of the development project.

Critical thinking (where you can analyse and evaluate different solutions to a problem to find the most effective solution) is also vital for writing high-quality code.

Get Comfortable with Composer, PSR, PHPUnit

These are some of the tools that make you a better PHP developer. Composer is a dependency manager that manages libraries, functions, and classes, making it easy for you to install different versions of each on a per-project basis.

Composer checks for new versions of these libraries and updates them as needed. You can find a list of ready-made packages compatible with Composer. The PHP Standard Recommendation (PSR) is a PHP specification that aims to standardize PHP programming concepts and improve the interoperability of PHP frameworks and components.

It is published by the PHP Framework Interoperability Group (PHP-FIG). There are currently 13 recognized standards, each with its purpose.  PHP developers must learn and follow these standards to reduce unnecessary variants in their PHP code.

At the same time, PHPUnit is a popular unit testing framework for automatically testing small units of code based on expected results. Unit testing is a good practice for a PHP developer like you and can be used in a Test-Driven Development (TDD) approach where tests are run even before the code is written.

Networking Skills

Networking with other freelance PHP designers and web development freelancers in other disciplines can help you find more referrals and jobs. Use Twitter, LinkedIn, and Facebook to connect with other developers and customers you work or collaborate with in the past. In the highly competitive job market, networking skills are invaluable.

Get Grip with PHP Best Practices and Design Patterns

Design patterns are very useful in all software development, including PHP. You can speed up development by providing repeatable solutions to common problems.

It also helps improve the readability of the code by identifying patterns used by other developers. Some of the most common design patterns in PHP applications include Factory, Strategy, and Singleton, but many other problems exist.

More generally, when using different PHP frameworks, you can save time by looking for best practices. The language has existed for more than 20 years, and behind it is a huge community. Make the most of this language so as not to make the same mistakes as others did.

What is the Future of PHP?

According to DAXX statistics, there were more than 5 million PHP developers worldwide in 2013, but this number increased to 5.5 million in September 2018. For comparison, the number of software developers worldwide reached 23 million in 2018, 26.4 million in 2019 and expected to reach 27.7 million by the end of 2023, regardless of knowledge of the software development language. New languages ​​may emerge, but PHP is always there, especially if it continues to evolve into more modern languages.

PHP Developer Salary

PHP developers are well paid for their jobs, and there are huge opportunities for you to grow.

According to the Glassdoor survey, in the United States, the annual salary of PHP developers is US$74,126, while in India, the annual salary of PHP developers is Rs 265,507.

According to the Glassdoor article, junior PHP developers (inexperienced and just getting started) can make an average of $74,000 per year.

In contrast, senior PHP developers can make an average of $114,000 per year. Keep in mind that these salaries may be higher or lower, depending on the company’s size, local needs, location, etc.


These six skills are essential for PHP developers. Web development is a highly competitive field and breaking in at the lower levels is challenging. Once you master these skills and start your career as an independent PHP developer, you will enjoy exciting jobs and high salaries.

Spread the love

8 Things a Visual Basic Developer Should Learn

If you are a computer science graduate who wants to become a software engineer or a software developer, you might come across the programming language Visual Basic. If you want to become a Visual Basic Developer there are some technical things you should learn to become a good programmer. 

While the technology has advanced far there are so many platforms, tools and languages coming out in the market. It doesn’t matter whether you’re a newbie programmer or an experienced, as a program developer you should have the knowledge on how to integrate the modern technologies and other technical stuff into your work to make a good software or product. 

In this blog, we will discuss 8 things you should learn as a Visual Basic Developer. 

Basics of Visual Basic

The first and foremost thing you should learn about Visual Basic is that you need to develop an understanding of the basics of this language. While there is already a word “Basic” in the name Visual Basic, you ought to believe that it is a language for beginners. And, what really Visual Basics is, it is an object-oriented programming language designed by Microsoft. Although it is designed for the novices, the power of VB cannot be underestimated. 

Simple but Powerful Syntax

Many criticise VB.Net for the simplicity in syntax. But it has the ability to create sophisticated and powerful applications with these syntax. A beginner who can understand the language of computers should be able to pick up Visual Basic easily. If you’re a newbie computer programmer, is a great place to start. The syntax is easy and straight forward that you will not find yourself writing hundreds of lines of code. VB offers many shortcuts that it makes coding so much easier. 

Application Creating Components

Visual Basic is a third-generation event-driven programming language. Derived from BASIC, Visual Basic enables rapid application development (RAD) of graphical user interface (GUI) applications. Using the components provided by the Visual Basic program, you can create an application. Third-party components were developed over time by a community of programmers. Programs written in Visual Basic require external function declarations such as the Windows API.  

Versions of VB

There are over 10 revisions on Visual Basic versions starting with Project ‘basic Thunder’ in 1990 and it remained as the primary internal function of VB as “ThunderRTMain”. The final version 6 was released in 1998 which now simply known as Visual Basic. Microsoft stopped supporting Visual Basic 6.0 IDE on April 8, 2008. The compatibility for Visual Basic 6.0 applications on Windows Server 2008 including R2, Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2016, Windows 10 and Windows Server 2019 are still maintained by Microsoft VB team. Some software developers still preferred Visual Basic 6.0 over its successor Visual Basic .NET in 2014, Visual Basic 6.0 won the technical impact award in 2016 at The 19th Annual D.I.C.E. Awards.

VB Applications (VBA)

In several Microsoft applications including Microsoft Office, VB Applications (VBA) is used as a macro or scripting language. Many third-party products such as WordPerfect Office 2002, AutoCAD, Sage 300 ERP, ArcGIS, Solid Works, and Business Objects Desktop Intelligence. Many inconsistencies were reported in the way VBA implemented in different applications. But it uses the same runtime library and is largely the same language as Visual Basic 6.0. Although development on Visual Basic ended with 6.0, in 2010 Microsoft introduced VBA 7 to provide extended features and add 64-bit support. 

VB on Demand

There are many US states that demand Visual Basic developers such as Arizona, Georgia, Florida, Kentucky, Delaware, Louisiana, Indiana and more to name. This is meant to help you understand VB is a programming language which is in demand. Therefore I recommend doing your own research and as well as searching in-depth for what is popular in your current city.

VB and Visual Basic .net

Visual Basic .net can be called as the successor of Visual Basic or a modern version of it. The Microsoft team developed this modern, simple, and object-oriented computer programming language to combine the power of .NET Framework. The hallmark of Visual Basic is combined with productivity benefits and a common language runtime. 

Get Training

Depending on how much time you spend on learning this language which is rather simple, it should take you a few months to become a competent programmer. If you feel you can’t do it all your own, get Visual Basic Training and start working on the more advanced details. In Visual Basic these advanced details include things like client/server programming, building ActiveX controls, database programming, the development environment itself (add-ins), the API, etc. 

Meanwhile, you can keep a watchful eye on program groups and forums. You will learn a lot by reading other peoples’ answers. You will also learn about new topics you may not have encountered before. When you see questions you can answer, do so. When you see something you think you can figure out, you may do it. Other people often ask questions you would not think to ask yourself. Tracking down the answers will teach you a lot.

These are the 8 things you need to learn in order to become a Visual Basic Developer. Still you are confused about whether the VB programming language is the right choice for your career? No need once you master all these, you will be an expert in Visual Basic. This may take one or more years depending on how much time you invest.

Spread the love

Software Development Methodology

Software development is an art. Because of this art software developers develop quality software. Software development comprises on series of step and each step is atomic step designed towards the perfecting of software. A bug free and time saving software product is the result of true and applicable methodology. The steps involved in the development engineering are long, conceptual and cumbersome. Software production is because of lot of hard work, ideas, experience and testing. Software developers are always struggling to deliver the best by introducing the new versions of software. It is always challenge for the software developers to provide the version of their product that can compete the market.

Software methodology is actual process that is gone through out the development of the software. It comprises a series of steps that are researching, planning, analysing, designing, coding etc. This means that software developers are customising according to needs of their clients. The basic standards that are required for implementation of software methodology are long term experience, industry knowledge and technology to develop software.

Have you ever counted that how fast technology is growing if you compare it with its earlier time? If we go two years back, we will observe exponential progress. Even our life style has changed and now we can complete our task at very rapid speed. Because of technology advancement our social life has improved. Things that were our dream in the past are happening very quickly today.

Whenever we discuss software methodology, it means we are talking about the agile methodology that is very recent introduction in the software industry. The word agile means ability to be quick with technology. It may also have the meaning that it can be more versatile with practice

If we ponder over the market, we will see hundreds of similar software is in the market and selecting accurate one is a tough job. Never compromise on the quality and keep in mind that software is always updated with the arrival of new technology norms , so do future agreement with the company to run your business smoothly.

SAP software modules are fulfilling the requirements of each size industry. Select software modules that are very necessary to run your business. With the deployment of this software, you also need professionals that can run these software modules. If you have already software professional, manage SAP training for them.

Spread the love

ES6 Interview Questions

ES6 stands for ECMAScript 6. ECMAScript was created to standardise JavaScript, and ES6 is the 6th version of ECMAScript, it was published in 2015, and is also known as ECMAScript 2015.

This is one of the essential skills of programmer now a days. Either front end or Back-end both of the development work are depend on JavaScript and ES6 is becoming backbone of the applications now a days.

The huge demand of ES6 required huge number of developers in almost the companies like IBM, Hot Star, HCL, TCS. You will find here ES6 Interview Questions and their solutions.

What is ES6 or What is ECMAScript?

ECMAScript 6 is also known as ES6 and ECMAScript 2015 or Simply JavaScript 6. ES6 is new version of JavaScript and having many new features. The new features of ES6 making JavaScript a New Age Scripting language.

The ES6 is the sixth edition of the language and was released on June 2015. It was initally known as ECMAScript 6 (ES6) and later renamed to ECMAScript 2015. This edition includes many new features like class, modules, iterators, for/of loop, arrow functions, typed arrays, promises, reflection.

ES6 has following new features included:

  • JavaScript let
  • JavaScript const
  • JavaScript Arrow Functions
  • JavaScript Classes
  • Default parameter values
  • Array.find()
  • Array.findIndex()
  • Exponentiation (**) (ECMAScript 2016)


What is difference between JavaScript and es6?

JavaScript is the language. ES (ECMAScript) is the standard governing JavaScript. ES6 is the version of ECMAScript draft in which a lot of features were introduced (classes, arrow functions etc). … JavaScript is an language whereas ES6 is an ECMAScript’s 6th edition. (Answer From Quora)

What are the new features of ES6?

ES6 comes with many new and prompt features like:

  • Immutable variables or constants are now supported
  • Arrow Function
  • Parameter Handling Extended
  • Modules and Classes
  • Extended Object Properties
  • Internationalisation and Localisation

What is Arrow function?

Arrow functions support expressions bodies and statement bodies which returns the value of an expression and makes the syntax more expressive. Arrow functions have lexical ‘this’ feature as well. Arrow (=>) is used as part of the syntax. Lexical this is declared or defined where the function is written. It comes under the umbrella of lexical scope; lexical scope has access to variables that are in its parent scope.


//Implementation With Classical Funnction
function add(a,b){
return a+b;

//Implementation With Arrow Funnction
const add = (a,b) => a+b;

Differences amongst classes, modules, and proxies?

Proxies enables object creation with a wide variety of behaviours available to host objects. It can be used for logging, profiling, etc.

Module defines the patterns from popular JavaScript module loaders. It supports exporting or importing the values from or to modules without the global namespace. It supports marking the value as the default exported value and max-min values.

Classes are based on the Object Oriented Programming style that is object-oriented programming. The class declaration makes the patterns easier to use. It supports inheritance, base class access, static methods, and constructors.

List data types supported by ES6?

JavaScript supports : Number, Boolean, String, null, undefined, Symbol and Object.

What are the Differences Between ES6 vs ES5?

ES6 : there are two new ways to define variables that are let and const.
ES5 : we could only define the variables by using the var keyword.

ES5 : both function and return keywords are used to define a function.
ES6 : An arrow function is a new feature introduced in ES6 by which we don’t require the function keyword to define the function.

ES5 : It supports primitive data types that are string, number, boolean, null, and undefined.
ES6 : There are some additions to JavaScript data types. It introduced a new primitive data type ‘symbol’ for supporting unique values.

How to Define a Constant in ES6?

In ES6, a constant is defined by a const keyword. ES6 provides a const keyword, which a constant uses and declare a const.

What is Webpack?

Webpack allows you to run an environment that hosts babel. Webpack is opensource JavaScript module bundler that takes modules with dependencies and generates static assets representing those modules.

What are the main benefits of Web pack in ES6?

Benefits of Web pack in ES6:

  • It has included dev server.
  • You only require including one JS tag sharp to server like localhost:8080/assets/bundle.js and get live system updating and advantage management in no costs.
  • Multiple modules and packs are bundled into a solo .js file.

What is Set?

Set are objects and collections of unique values. Duplicate values are ignored, as the collection must have all unique values. The values can be primitive types or object references.
NOTE : NaN and undefined can also be stored in a Set. NaN is considered the same as NaN (even though NaN !== NaN).

What is Spread Operator in ES6?

Spread Operator provides a new way to manipulate array and objects in Es6.A Spread operator is represented by … followed by the variable name.
Example :

let a =[7,8,9];
let b=[1,2,3,...a,10];
console.log(b); // [1,2,3,7,8,9,10]

So spread operator spreads the contents of variable a and concatenates it in b.

Another Example

function print(...z){



Spread the love

Freelancer PHP Level 1 Exam Questions Answers is an open platform for the skilled person to get projects and jobs according to their expertise. There are many types of projects there like Fixed Price Projects, Hourly and Contests. One can get their job done by an Expert on either side of the globe.

There are options to bid on the project and submit your proposals. The person who is looking for an expert will evaluate your profile , proposal and skill and then after conversation you get rewarded for this project. After successfully completing the stages you will get mile stones created by the Employer.

But at the same time the competition is High and It’s tough to get recognised by the employer. Freelancer provides assessment of the skills of various levels.

You can try these exams or quizzes and after completing it by scoring the appropriate marks set by the Freelancer you will get a badge of the Level of the Skill.

And this badge will make an impact on employers that you have knowledge of a particular skill.


Passing an exam increases your chances to get awarded the project by your employer. In This Section You will get stuff that is really helpful to you in clearing the Freelancer PHP Level 1 Exam. We have listed almost the questions asked in Exam and Answers for the same.

The file handle argument in fread() allows you to specify ___________.

Answer: the number of bytes you wish to read


$count = $count + 8; can be written as:

Answer: $count += 8;


Which of the following is a special PHP variable that is used under HTTP Authentication?



XML is used for:

Answer: All of these

Data manipulation and storage

Display formatted data in a browser using style sheets.

transfer data between organizations

transfer data between software applications


Which kind of reference action allows you to have two variables referring to the same content?

Answer: Assign by reference.


____________ describes the structure of a class of XML documents, specifying how elements are related and allowed.

Answer: Document Type Definition


Which parameter of setcookie() indicates that the cookie should only be transmitted over a secure HTTPS connection from the client?

Answer: secure


Which of the following can be included in a phar file?

Answer: All of these

a manifest describing the contents

a signature for verifying integrity

a stub

the file contents


Which of the following will encrypt a password?

Answer: crypt($password);


Which of the following will connect to a data base using PEAR?

Answer: DB::connect(data_source_name);


Which of the following will return 1 if the Memcache session handler is available and 0 if not?



Which bz library function returns bzip2 encoded data after compressing a given string?

Answer: bzcompress()


Which function opens a memcached server persistent connection?

Answer: Memcache::pconnect


On the additional header that PHP allows you to include on an email you can add:

Answer: All of these




MIME version

X-mailer and version number


__________ is the same as setcookie() but the cookie value will not be automatically urlencoded when sent to the browser.

Answer: setrawcookie()


Which function enables automatic compression of large values?

Answer: Memcache::setCompressThreshold


Which of the following will send queries to a database using PEAR?

Answer: none of these







Which PHP library allows you to connect to and communicate with different types of servers using many different types of protocol?

Answer: cURL


Which configuration directive sets the size of data chunks for transfers?

Answer: memcache.chunk_size


What does PEAR stand for?

Answer: PHP Extension and Application Repository


Which of the following functions are used to encrypt passwords?

Answer: md5() and crypt()


Which cURL function sets an option on the given cURL session handle?

Answer: curl_setopt


Which of the following are examples of resource types in cURL?

Answer: cURL handle and a cURL multi handle


Which API treats XML as flow-through string data?

Answer: CAX


What does XML mean?

Answer: eXtensible Markup Language


singleton design pattern

Answer: Sometimes it’s important to have only one instance for a class. For example, in a system there should be only one window manager (or only a file system or only a print spooler). Usually singletons are used for centralized management of internal or external resources and they provide a global point of access to themselves.


PHP magic constant

Answer: __LINE__


When a small window pops up in front of the browser asking your username and a password, what kind of Authentication is being used?

Answer: HTTP


In session management cookies are usually not used for:

Answer: logging the user in for the first time


Which function returns the version of the server?

Answer: Memcache::getVersion


Which character must be set in the $mode argument for fopen($file, $mode) to open a file for reading and writing?

Answer: r+;


Which of the following will open the file “time.txt” as readable?

Answer: fopen(“time.txt”,”r”);


_____________ attempts to establish an FTP connection to a remote server by emulating an FTP client.

Answer: FTP ftp_connect()


Which of the following is the correct syntax to retrieve an object from the memcache module?

Answer: $result = $memcache->get(‘key’);


Which of these will perform integer rather than floating point division?

Answer: intval(x/y)


$count = $count * 3; can be written as:

Answer: $count *= 3;


What is the correct way to add 1 to the $counter variable?

Answer: $counter++;


Which operator appends the argument on the right side to the argument on the left side?

Answer: .=


With the ________ bitwise operator, the bits set in $a are not set, and the not set bits are then set.

Answer: ~


Which bitwise operator will set the bits that are set in either $a or $b.

Answer: ” | “


Which of the following allows you to set a user-defined exception handler function?

Answer: set_exception_handler


In an object method, which of the following is always a reference to the caller object?

Answer: $this


Which kind of reference is used by creating a local variable in a function and a variable in the calling scope referencing the same content?

Answer: Assign by reference.


Which of the following returns the remainder of $a divided by $b?

Answer: $a % $b


What PHP operator is used to access methods and properties of objects?

Answer: ” -> “


Which interface type allows you to chain methods of an object together?

Answer: Fluent Interfaces


Interfaces define a “contract” specifying that an object is capable of implementing a method ____________.

Answer: Specifying exactly how is to be done.


What is the correct way to create a function in PHP?

Answer: function yourFunction()


Which of the following will print “Hi ” followed a name argument passed to the function?

Answer: function sayHi ($name){ print “Hi $name”; }


Include files must have the file extension:

Answer: none of these


What is the term for using a class to create an object?

Answer: Instantiation


PHP constants:

Answer: All of these apply


Can be accessed anywhere in the script regardless of the scope.

Can be used as default argument values.

Cannot change during the execution of the script.

Follow the same rules as labels in PHP.


Which statement can replace several else Statements?

Answer: switch


To retrieve information from a form that is submitted using the “get” method, use ___________.

Answer: $_GET[];


Which POSIX function takes the following two string arguments and an optional third-array argument: A POSIX-style regular expression pattern, and the target string to be matched?

Answer: ereg()


Which PHP operator will attempt to execute its contents as a shell command?

Answer: (` `)


What function takes any number of numerical arguments and returns the largest of the arguments?

Answer: max()


To unregister a session variable STRING use:

Answer: session_unregister(STRING);


Which of the following is correct to select a database in MS SQL?

Answer: mssql_select_db(STRING)


Select the variable used to set the php.ini file to send emails containing the address of the default PHP mail sender.

Answer: sendmail_from


Which configuration directive is used to transparently failover to other servers on errors?

Answer: memcache.allow_failover


Which PHP function is identical to the C fwrite() function?

Answer: fputs()


Which function writes a string to a file?

Answer: file_put_contents


To denote strings in PHP, you can use both double quotes ” ” and which other characters?

Answer: single quotes ‘ ‘


What kind of elements can be contained in constants?

Answer: All of these







Which PHP operator type allows you to execute its contents as a shell command?

Answer: Execution operator


PHP variables start with the following symbol:

Answer: $


Which POSIX function takes a pattern, a target string, and an optional limit on the number of portions to split the string into.

Answer: split


What function raises the first argument to the power of the second argument, with decimal places to be specified by the scale factor?

Answer: bcpow


Instead of a single new line character some clients require which characters?

Answer: “\r\n”


Which function parses input from a file according to a format?

Answer: fscanf


Which file should be edited to set configuration directives?

Answer: php.ini


Which of the following is correct in PHP?

Answer: Zero is interpreted as false


Which parameter of setcookie() defines the amount of time for which a cookie is valid?

Answer: expire


Which control structure allows you to quickly traverse through an array?

Answer: foreach loops


Which types of code can be affected by namespaces?

Answer: Classes, functions and constants.


Although any valid PHP code can be contained within a namespace, only four types of code are affected by namespaces: classes, interfaces, functions and constants.


Which cURL function returns the last error number?

Answer: curl_errno


Which of the following is an invalid constant name?

Answer: 2DAY


Which PHP operator allows you to assign values to variables and arrays?

Answer: “=”


What is the term for breaking the binding between a variable name and variable content?

Answer: Unsetting references.


Which is the operator for the integer remainder from the division of two values?

Answer: %


Which predefined Memcache function turns on data compression?



Which compressed file type can be decompressed without specifying the extension?

Answer: zip


Which configuration directive, in conjunction with memcache.allow_failover, defines how many servers to try when setting and getting data?

Answer: memcache.max_failover_attempts


The correct way to create a numeric variable “v” that might have any real number is:

Answer: $v;


Which of the following databases are supported by PHP?

Answer: All of these



Oracle and Informix

PostgreSQL and Frontbase

mSQL and Interbase


Which of the following is the line to enable in the php.ini file for Windows in order to be able to use DBX?

Answer: extension=php_dbx.dll


Which of the following is the correct way to connect to a mySQL Server?

Answer: mysql_connect(SERVER, USER, PASSWORD);


Which of the following will return variables from a form sent by the HTTP POST method in PHP?

Answer: $_POST


Which version of PHP introduced object oriented programming?

Answer: PHP III


Which of the following will correctly create a constant “const”?

Answer: const const;


What variable is used by session cookies as a user ID?



Functions that represent a behavior of a class are called _________.

Answer: Methods


Which zip function retrieves the compressed size of a directory entry?

Answer: zip_entry_compressedsize


What does cURL stand for?

Answer: Client URL


Which function clears the cache of file status info?

Answer: clearstatcache


Which method defines HTTP Authentication using Apache Server?

Answer: .htaccess files


What is the most widely accepted meaning of the acronym “PHP” today?

Answer: PHP: Hypertext Preprocessor


_______________ defines a cookie to be sent along with the rest of the HTTP headers.

Answer: setcookie()


A special method to perform any activity required to instantiate an object is called a(n) __________.

Answer: Constructor


Which POSIX character matches zero or more instances of the previous regular expression?

Answer: *


Which POSIX character matches any character?

Answer: .


If an exception is not caught, a PHP Fatal Error will be issued with what message?

Answer: “Uncaught Exception …”


Which statement retrieves the value of a function after it is called?

Answer: return


Which “magic” constant implemented inside an include, returns the directory of the included file.

Answer: _DIR_


Which function returns a string containing a byte-stream representation of any value that can be stored in PHP?

Answer: serialize()


How do you write “Hello World 2010” in PHP?

Answer: echo “Hello World 2010”;


Which command returns the filename component of a path?

Answer: string basename ( string $path [, string $suffix ] )


Which file mode will read and write to the end of an existing file or create a new file?

Answer: “a+”


Which server verifies the name password and mail spool location?

Answer: SMTP Server


What does MTA stand for?

Answer: Mail Transfer Agent


The agent used to collect and access the mail spool is called:

Answer: Mail Transfer Agent – not sure


__________ is an extension that provides a way to put entire PHP applications into a single file called PHP Archive for easy distribution and installation.

Answer: phar


Which function is used to connect to a database using Authentication by SQL Database Query?

Answer: @mysql_connect(“localhost”,”databaseuser”,”password”)


Which function takes a single argument and returns the largest integer that is less or equal to that argument?

Answer: floor()


Which function takes a single argument and returns the smallest integer that is greater than or equal to that argument?

Answer: ceil()


What is the expression for returning the square root of 2?

Answer: sqrt(2)


Which Perl Compatible Regex function takes a regex pattern and an array and returns an array of the elements of the input array that matched the pattern?

Answer: preg_grep


Protected members are available to:

Answer: The class itself and the classes that inherit from it


Which of these variables has an illegal name?

Answer: $your-Var


A(n) _____________ is an ordered map that assigns values to keys:

Answer: array


What PHP type represents a series of characters?

Answer: string


Which of the following is NOT a correct way to specify a string?

Answer: alfanum syntax


Strings in PHP can be specified in four different ways: single quoted, double quoted, heredoc syntax and (since PHP 5.3.0) nowdoc syntax


Which of the following allows you to express any real number?

Answer: double


Which of the following is the correct way to create a reference to a global variable?

Answer: $var =& $GLOBALS[“var”];


Which of the following provides a means to access the same content on PHP variables by different names?

Answer: References


Which PHP operator is used to concatenate strings?

Answer: “.”


What PHP token that allows access to static, constant, and overridden properties or methods of a class?

Answer: ::


Which PHP operator type returns the result of string arguments?)

Answer: String operators


Which of these restrictions applies to namespace implementation?

Answer: Nested namespaces are prohibited.


What term applies to an identifier with a namespace separator that begins with a namespace separator, such as \Foo\Bar?

Answer: Fully qualified name.


Which of the following objects lets you create code which specifies which methods a class must implement, without specifying how the objects are handled?

Answer: Interfaces


Which Interface allows you to use a design pattern that is characteristically changed with the instantiation of objects?

Answer: Instantation Design Interface


Which POSIX character matches the beginning of a string only?

Answer: ^


Which of the following are two broad classes of regular expressions that PHP works with?

Answer: POSIX and PHP-compatible regex


Which statement allows you to end a loop?

Answer: break


This “magic” constant refers to the name of the current namespace and it is defined in compile-time



What is the name for instances of a class that contain all the internal data and state information need for the application to run

Answer: Objects


___________ allows a class to be defined as being a member of more than one category of classes

Answer: Polymorphism


The ability to define a class of one kind as being a subtype of a different kind of class is called:

Answer: Inheritance


Which function changes server parameters and status at runtime?

Answer: Memcache::setServerParams


Which function forces a write of all buffered output to the resource pointed to by the file handle?

Answer: fflush


Single-line comments in PHP use the following:

Answer: //


The ability of a class to protect access to its internal member variables is called:

Answer: encapsulation


You can use what function in order to check if a constant is set?

Answer: defined();


Which of these will perform integer rather than floating point division?

Answer: intval(x/y);


______________ is a mechanism for storing data in the remote browser and thus tracking or identifying return users.

Answer: Cookies


Using the Zip Archive Class, which of the following will include a file to a ZIP archive from a given path?

Answer: zipArchive::addFile


Which of the following is an example of predefined cURL constant?

Answer: All of these







Which of the following refers to a set of functions that allows you have access to multiple supported databases without writing your own wrapper functions?

Answer: PHP DBX


Which of the following is the correct syntax to retrieve an object from the memcache module?

Answer: $result = $memcache->get(‘key’);


_____________ attempts to establish an FTP connection to a remote server by emulating an FTP client.

Answer: FTP ftp_connect()


Which of the following will open the file “time.txt” as readable?

Answer: fopen(“time.txt”,”r”);


Which character must be set in the $mode argument for fopen($file, $mode) to open a file for reading and writing?

Answer: r+;


Which of the following is the correct way to implement a “for” control structure?

Answer: for($i=0; $i<10; $i++){ // do something }


Which of the following is the only keyword that can be written before the namespace at the top of the file?

Answer: declare


What is the correct way to access the property of a PHP object?

Answer: $obj->property


Select the convention sign used to indicate private variables and functions:

Answer: _ for $_name


Arrays can be sorted with which of the following functions?

Answer: arsort(), ksort() and uksort();


Private members are accessible to:

Answer: The class itself and the classes that inherit from it


Which function returns the square root of its argument, with number of decimal places set by the optional scale factor?

Answer: bcsqrt()


What 2 types of parsers are used in PHP?



What does MIME stand for?

Answer: Multipurpose Internet Mail Extensions


Which configuration directive defines a comma separated list of server urls to use for session storage?

Answer: session.save_path


Which function gets permissions for the given file?

Answer: fileperms


Which function checks whether a file or directory exists?

Answer: file_exists


PHP constants:

Answer: All of these


Do not have a dollar sign ($) before them.

May be defined and accessed anywhere without regard to variable scoping rules

May not be redefined or undefined once they have been set.

May only evaluate to scalar values.


Which PHP operator type allows evaluation and manipulation of specific bits within an integer?

Answer: Bitwise operators


At compile time static values are bound with

Answer: a name


Which Perl Compatible Regex character will cause any special character to be treated as a simple matching character?

Answer: \


Session files should not be stored on a directory viewable from the Web server because:

Answer: Malicious users may access other users’ login details


Which API reads in an XML file and creates a “walkable” object tree in memory, so it can be used in large documents?

Answer: DOM


What APIs are used for handling XML documents?

Answer: Document Object Model (DOM) and Simple API for XML (SAX)


________________ tests for the end of file on a file pointer.

Answer: feof()


Instantiate an object Demo: require_once(‘class.Demo.php’);

Answer: $objDemo = new Demo();


Which of the following is correct for adding a comment in a PHP script?

Answer: /* comment */


Which function returns (and caches) file permissions level?

Answer: fileperms(file)


Which PHP function sets file modification time or creates a file if it does not exist?

Answer: touch(file, [time])


Which of these PHP file open modes are valid for the specified conditions?

Answer: All of these


The ____________ function can be used in combination with the PHP header() construct to assemble and send file downloads.

Answer: fpassthru


Which function returns (and caches) the time a file was last accessed?

Answer: fileatime(file)


How do you modify the php.ini file to have sessions work correctly on windows?

Answer: change session.save_path = /tmp to session.save_path=C:/temp


Which function gets statistics from all servers in a pool?

Answer: Memcache::getExtendedStats


Which of the following functions returns a Boolean value after attempting to send a message?

Answer: mail()


Which of the following is the correct way to connect to a MySQL database?

Answer: mysql_connect(“localhost”);


Which files should be used to install cURL in an include directory?

Answer: easy.h and curl.h files


Which function returns the largest number that may be returned by rand()?

Answer: getrandmax()


Which Perl Compatible Regex function inserts escape characters into strings that are intended for use as regex patterns.

Answer: preg_quote


Which of the following shifts the bits of $a $b steps to the left?

Answer: $a << $b


What PHP function returns the arctangent in radians of a numerical argument?

Answer: atan()


Which function is used to start tracking a user?

Answer: session_start();


What statement will delete session files?

Answer: session_destroy();


How are sessions tracked on PHP

Answer: With code rewriting using the PHP Session reference variable


Which statement will skip the rest of the current loop iteration and continue execution at the beginning of next iteration.

Answer: continue


Which function returns (and caches) the owner ID number?

Answer: fileowner()


Which of the following is the correct way to implement a do-while loop?

Answer: $j=0; do { print “$j”; } while ($j > 0);


Which of the following is correct to show a message for an exception?

Answer: throw new Exception (“Invalid data”);


What term refers to the ability to shorten Extra_Long_Names improving readability of source code?

Answer: Aliasing


Which operator performs the same function as x=x%y?

Answer: %=


The control error operator is:

Answer: @


Which of the following is the not equal operator?

Answer: !=


Which Perl Compatible Regex function takes a regex pattern as first argument, a string to match against as second argument, and an optional array variable for returned matches?

Answer: preg_grep


What are the levels of visibility possible for a variable or method?

Answer: Public, Private and Protected


Spread the love

10 Reasons to Study Computer Science

If you take up computer science as your major course in college, you will have an in-depth knowledge of the hardware and software devices and how these are used to benefit you, the workforce, and other aspects in this high technology era where practically everything is computerised. If you are afraid of new, just be sure you know the site which offers you computer science homework help.

By choosing computer science, you open up yourself to a plethora of opportunities such as the following:

Job opportunities

Practically all industries these days are utilising both hardware and software for the advancement of their businesses. Even the ones that are used at homes such as alarm systems and lighting devices make use of the internet. These home devices are controlled via the use of smartphones. If you have the knowledge and skills on how to connect, to troubleshoot, and to maintain these things, then it will be easier for you to get a job. Not to mention, that these positions are high-paying jobs.

Computer Languages are Useful Anywhere

The world is at your fingertips. By having a deep knowledge of computer languages, you can work anywhere you want to be. There are a lot of international work opportunities that await someone like you who is good with programming language.

Tech Internship Opportunities

Many companies prefer to hire workers who have some kind of job experience. What’s good about computer science is that you have the privilege to work as an intern in top companies in your area. Though you do not get paid for your services but what you get is a valuable experience and hands-on job in the line of work that you wish to do in the near future.

Those who have tech internship experience have a bigger chance of landing an awesome job.

Good Pay

Computer science jobs are very financially rewarding. In fact, based on an article in a US news, someone who works in the field of computer science earns $101,000.00 annually as a software developer, $139,000.00 as an IT Manager, and $67,000.00 as a web developer.

Good at Problem Solving

If you choose computer science as your course, you learn to be an analytical thinker. You will be trained on how to manage your emotions appropriately when you are faced with a difficult task to solve. In short, you become more objective than subjective which is an important trait when it comes to managing decisions in various aspects of life.

Tutorial Job Opportunities

Who would resist the chance to work at home and get paid well? That is one of the opportunities that you open yourself into if you will take-up computer science as your college course. You can offer your services online to students and to those people who want to gain knowledge about computer science help online.

You can do this either as a full-time or a part-time job.

Study Online

Are you worried that you do not have the time to go to school study? No worries, the computer science course allows you to study and finish your course at the comfort of your home or perhaps anywhere you are in the world.

All you need is a strong internet connection. You manage your own time. You decide when it is convenient for you to study. The only important thing to consider is to submit all the requirements on time. Otherwise, you are the master of your own time.

Collaboration with Others

These days, you can learn more knowledge through collaboration. In fact, if you are the shy type, you may even find it rewarding because you learn even if you do not see the other person. You can ask queries, get enlightenment through emails, and other forms of online messaging.

It can be a two-way stream, too! You get ideas from others while you also share with them what you know about the language of the computer. Such is the beauty of collaboration online.

Increase Creativity

As you advance in the course of computer science, you eventually learn how to break codes and at the same time, learn how to create new codes. Coding encourages students to be creative meticulous because creating codes demand precision and accuracy.


Immense Research Opportunities

As you learn how algorithms function, you open yourself to vast knowledge. Not everyone is knowledgeable about algorithms and this limits their research opportunities. The computer world is very rich in information, unfortunately, not everyone knows how to access this information.

But if you choose computer science as your course, you are lucky because you will discover how to unlock all those opportunities to learn new and more things around you.

There is no doubt that technology is becoming more sophisticated. Learning more about computer science is a step that students can take to see the world and what it has to offer to them.

Spread the love

WordPress After Login Redirect Hook

Want to enhance your WordPress functionality using custom coding, then you are at the right place.  In this article, you are going to learn how to redirect on a custom page after a successful login in WordPress. When you are working on Woocommerce or any other type of application based on WordPress and you need to redirect your logged in user other than the default page or My Account page then you need to add few lines of codes in your functions.php.  Although there are many plugins available for this simple work you can create your own plugin using this successful login redirect code. WordPress is known for its simplicity and flexibility. We will use the feature of filters and hooks to extend the functionality.

Use hook wp_login()

There is wp_login() and we can use this function as a hook to create our own function and to redirect after login.

do_action( 'wp_login', string $user_login, WP_User $user )


Now we can write our own function to modify the default redirection. Suppose we have to redirect on the home page rather than the default page after successful login in WordPress. Then the code in the following example is sufficient :

function my_login_redirect() {
add_action( 'wp_login', 'my_login_redirect', 10, 3 );


Spread the love

Why Laravel Is The Top PHP Framework In 2020-2021

Numerous PHP-frameworks are accessible to use as open-source and free. Be that as it may, at whatever point we talk about Laravel, then the issue is unique. Try not to stress. It is likewise open-source and free PHP structure; however, it came in presence as the top and a propelled contender to the CodeIgniter system.

It is furnished with numerous highlights; for example, worked in help for client authentication and authorization. CodeIgniter missed these highlights. That is the reason the web advancement process utilizing CodeIgniter was very hard.

The expansion of the above highlights expanded the ubiquity and distinction of the Laravel structure. Numerous Laravel development companies engineers as their significant component for creating web applications and believe it is the best and most prestigious PHP structure.

Engineers likewise use Bootstrap Laravel formats while they grow large and complex applications. Numerous different highlights make Laravel the best PHP system in 2020.

We take an itemized conversation on the highlights and rule of the Laravel PHP system in web advancement:

Application structure

About the application structure in Laravel, it accompanies a default application structure. Its application structure is straightforward to use, thus giving high convenience to begin little or huge applications. With this component, designers can modify the application according to the proprietor requests.

Multiple File Storage System

Laravel is in build with various storage systems like cloud, Amazon, and other Exchanging between these profoundly included, and in vogue distributed storage systems will be a not too bad and simple errand because the API utilized for every one of these systems is the equivalent.

A standout amongst other things like this will be the designer will be permitted to use all these three distributed storage systems just in a single application. It will allow engineers to rapidly and effectively serve these files from various areas with no issue.

MVC Architecture Support

Concentrate on straightforwardness is an indispensable factor between business rationale and introduction being developed. Laravel supports MVC. MVC is named as Model View Controller. This design has a full scope of inherent capacities. MVC empowers engineers to support the presentation and offers reasonable documentation advantage.

To get a full favorable position of the Laravel structure, it is recommended to interface with experts having long stretches of understanding and aptitude as they are the individuals offering the total capacity to your web improvement given by Laravel.

Article Oriented Libraries

Laravel accompanies the enormous assortment of Object-Oriented Libraries fused with numerous pre-introduced and worked in libraries like Authentication library. CodeIgniter, Symphony, and other well-known PHP frameworks don’t offer these sorts of Object-Oriented Libraries.

Laravel Authentication Library is outfitted with a wide scope of cutting edge highlights. A portion of different highlights incorporates checking dynamic clients, cross-site insurance and REquest Forgery encryption, Bcrypt hashing, and secret key reset.


Laravel offers restriction benefits that are useful to the engineers in a way to recover strings of a few dialects. Along these lines, the web application will bolster different dialects without any problem. It is beyond the realm of imagination with various frameworks, so it makes Laravel a worldwide marvel.


Pagination is a run of the mill task in web advancement; however, Laravel makes it simpler at the initial step. It causes designers to make clever connections for any site created on the HTML and current page. Moreover, the connections made by designers utilizing pagination in Laravel will perfect with Bootstrap CSS structure.

Sharp edge Template Engine

One of the intriguing realities about Laravel is that it gives an in-manufactured layout motor named Blade. The powerful and smooth Blade templating motor necessarily accompanied Laravel 5.1. Laravel accompanies a first anyway still strong templating engine which isn’t accessible in other PHP frameworks.

It helps engineers from using the understandable code in the views. Also, the cutting edge views then effortlessly take care of into simple PHP code and are before revamped they are stored.

In a couple of conditions, altering or erasing an announcement appears to be an extreme errand while dealing with unpredictable and enormous undertakings. Be that as it may, Blade in Laravel encourages designers to expel or change the announcement with no issue handily.

Steering System

Laravel encourages designers to use a directing framework that is exceptionally helpful and straightforward. They require building up an index for the URI and afterward create and execute appropriate connects to the named courses.

The primary advantage is that while making the code, it puts the URIs depended on connections to the particular links and paths and updates them if the course change.


There are just a couple of frameworks that realize that making authentication is straightforward and quick. Like this, everything has been designed and included as of now for the web engineers for the most part.

The arrangement files comprise every single extraordinary archive that is basic for dealing with the elements of authentication services.

Programming Task Management and arrangement

In each web advancement, the process task the executives and setup is a fundamental factor that ought to be considered by each engineer top to bottom. It is likewise a necessary errand to be done on schedule. It may be sending some other errands or an email, clearing the database, overseeing undertakings efficiently consistently assume a significant job.

Try not to stress the platitude possibly commonplace, yet usage isn’t as Laravel is here with an order scheduler.

While utilizing the order scheduler, just the code passage will be included your server. Corn calls this scheduler over and over.

After the execution of the order, Laravel assesses the booked errand and run all the pending assignments. As such, Laravel offers ease in planning and dealing with the undertakings.


It is challenging to state if any web application is secure and ensured. With the Laravel PHP structure can give the top security to web applications as the passwords will never get spared inside the system as the understandable content. This is the principle reason Laravel uses the hashed secret phrase for security.

Laravel likewise gives the best counteraction to your web applications from infusion assaults. It utilizes SQL articulations to decrease the opportunity for genuine dangers.

Laravel offers numerous security features that include ensuring courses, encryption, HTTP essential authentication, and so forth.

Programmed Package Discovery

Programmed Package Discovery in Laravel discovers which bundles are wanted by clients to introduce. There is no compelling reason to set up any examination.

It is anything but challenging to impair this element, and engineers can do it with no issue. This component is likewise the purpose behind the ubiquity of Laravel.

Spread the love

Can you Learn C++ without Learning C

I can answer this question straight away by either saying a ‘Yes’ or ‘No’. But, by simply saying a ‘Yes or No’ won’t justify the answer. It all depends upon the ability of the person who is learning C++. But, it can end up like you learn to drive an automatic car without knowing the manual driving lessons. When circumstances arrive, you may have to simply say “I don’t know”. Therefore, it is always better if you learn the basics rather than moving ahead baseless. After all, C++ is just an improvement on C. Now, let me help you with all the points that will add more justification, comparison, and reason. Let’s navigate through these points. 

Why should you learn C?

Learning C programming has a lot of benefits. But first, you need to understand the underlying architecture of how things work with C is very important. 

C was initially developed by Dennis Ritchie between 1969 and 1973 as a procedural programming language. The main purpose of developing this system programming language was to write an operating system. Some of the features which make C language suitable for system programmings like an operating system or compiler development are its: 

  • Low-level access to memory
  • A simple set of keywords
  • and a Clean style

Like in the case of learning to drive an automatic and manually driving car, if you know to drive a manual car, it will make driving an automatic car all the easier. Similarly, if you learn C programming first, it will help you to learn any modern programming language very well. 

Advantages of Learning C 

  • C language helps you to understand the underlying architecture of an operating system like pointers, working with memory locations, etc.
  • C can be called as a middle-level language, because, it combines all the features of Low-Level machine-understandable assembly languages and High-Level user-friendly languages. Language C reduces the gap between the low-level and high-level languages and can be used for writing operating systems as well as doing application-level programming.
  • It allows you to develop portable and firmware applications. The C language was developed with an objective of writing system software and therefore, it is ideal for developing firmware systems.
  • Learning C language first helps you to understand the fundamentals of Computer Theories like Computer Networks, Compiler Designing, Computer Architecture, and Operating Systems. If you’re working on these theories, it requires a good knowledge of C programming. 
  • Also, C helps you to understand machine-level details. So if you want to work as a networking engineer or a system administrator, learning C language is a must to work with CPU cache, memory, and network adapters. 
  • Learning C is easy as it has fewer libraries in comparison with other high-level languages. It will clear out programming concepts to a great extent as in C you have to write a lot of things from scratch. This will not only help in building your analytical skills but will learn to implement some basic operations all your own. 
  • Programs written and compiled in C can be executed faster than other programming languages. Also, not having any additional processing overheads such as garbage collection or preventing memory leaks, etc makes C more advantageous. While a programmer must take the initiative to do all the things his own. 
  • C uses embedded programming extensively where it is used to control micro-controllers such as auto-motives, Robotics, Hardware, etc.
  • C creates a list of instructions for a computer to follow and therefore it is easy to learn the language. 

Key Differences between C and C++

C++ language is a subset of the C language and was first designed as an extension of C. 

When C has procedural language features, C++ has both procedural and object-oriented programming features like polymorphism, inheritance, abstraction, encapsulation, etc.

Best C/C++ IDEs

C and C++ are very popular and actively used across various applications and systems worldwide. Both languages are still actively used by most programmers because of the powerful set of features and the excellent security of C++. One of the best things about C++ is its IDE or the Integrated Development Environment. This environment offers the developers a digital environment to develop software, hardware and games with the built-in function like code completion, integration, debugging, and all the way to compiling and syntax highlighting. During the year 2020 and beyond, the developers will have some of the top and the best C++ IDE’s. Some of these C++ IDEs can also be used for C programming. They are:

Eclipse- An easy-to-use powerful IDE that offers open-source utility and functionality. It is also one best C++ IDE for Windows Applications. 

Code:: Blocks- It is a free C/C++ IDE that has all the features to meet the demands of the C and C++ developers. This IDE can be used on Windows. 

GNAT Programming Studio-  Also known as GPS, GNAT Programming Studio is a highly advanced Free IDE that simplifies the interaction between the software and its developers. 

Visual Studio Code: Developed by Microsoft and based on an Electron framework, Visual Studio Code is an open-source IDE designed for Windows, macOS, and Linux. It is the most popular developer environmental tool and best IDE among others with excellent customization options. 

Similarly, other popular and the best C++ IDE for Windows, Linux, and Mac OS X are CodeLite, Dev C++, Qt Creator, Sublime Text, Linx, MonoDevelop, CLion, Anjuta, and C++ Builder

If you have the willingness to learn C or C++ languages regardless of whether you’re just a beginner or a C or C++ Programmer, IDEs are best to make your programming career easy. 

C++ Compilers

C++ Compilers are necessary when you start doing a specific program as it will make your job easier and for computers to understand the input given. There are too many C++ compilers which can be recommended that are either available for free or for a price. The higher the prices, it will reflect in the features offered to you. 

While the C++ world is just too large and too much new is happening, you will require a C++ certification to fight the competition in the industry. 

Features & Properties of C

  1. Procedural
  2. System programming language
  3. Does not support classes and objects
  4. Bottom-up approach
  5. Supports pointers

Features & Properties of C++

  1. Object-oriented
  2. Faster Execution and Speed
  3. Rich library support in the form of the standard template library
  4. Supports Pointers & References
  5. Bottom-up approach
  6. Compiled

Although C++ is much more advanced and superfast than C if you want to make your journey easier to start from the basics. It will help your learning not only C++ but also any other languages easier. So, let’s start from the beginning with an extremely simple C program and build up from there. There are numerous benefits of learning to c/c++ language for your career. It is recognized worldwide and used in a multitude of applications. It will help you secure a great career in the future. 

Spread the love

React JS Interview Questions

React is a JavaScript library for building user interfaces. It is based on ES6 Script Extension. ES6 is ECMA Script 2015. React provides seamless manipulation and rendering of DOM objects.

We also consider it as a Popular JavaScript framework based on Redux Architecture. React is developed and maintained by Facebook Inc. React was first created by Jordan Walke, a software engineer working for Facebook. Facebook is using React since 2011 and Instagram since 2012.

So it is a necessary skill to have in your stack. You will be considered if you are an expert in React JS.  Here are some important React Js Interview Questions and Answers useful for Javascript Interview.

What is React?

React is an open-source front-end JavaScript library that is used for building user interfaces especially for single-page applications. It is used for handling the view layer for web and mobile apps. React was created by Jordan Walke, a software engineer working for Facebook. React was first deployed on Facebook’s News Feed in 2011 and on Instagram in 2012.  Read more about – What is React JS?

What are the major features of React?

The major features of React are:

  • It uses VirtualDOM instead of RealDOM considering that RealDOM manipulations are expensive.
  • Supports server-side rendering.
  • Follows Unidirectional data flow or data binding.
  • Uses reusable/composable UI components to develop the view.

What is JSX?

JSX is a XML-like syntax extension to ECMAScript (the acronym stands for JavaScript XML). Basically it just provides syntactic sugar for the React.createElement() function, giving us expressiveness of JavaScript along with HTML like template syntax.

In the example below the text inside the <h1> tag returns as JavaScript function to the render function.

class App extends React.Component {

  render() {



        <h1>{'Welcome to React world!'}</h1>





What are Pure Components?

React.PureComponent is exactly the same as React. Component except that it handles the shouldComponentUpdate() method for you. When props or state changes, PureComponent will do a shallow comparison on both props and state. A component, on the other hand, won’t compare current props and state to next out of the box. Thus, the component will re-render by default whenever shouldComponentUpdate is called.

What is the difference between state and props?

Both props and state are plain JavaScript objects. While both of them hold information that influences the output of render, they are different in their functionality with respect to the component. Props get passed to the component similar to function parameters whereas the state is managed within the component similar to variables declared within a function.

What is the use of refs?

The ref is used to return a reference to the element. They should be avoided in most cases, however, they can be useful when you need direct access to the DOM element or an instance of a component.

What is Virtual DOM?

The Virtual DOM (VDOM) is an in-memory representation of Real DOM. The representation of a UI is kept in memory and synced with the “real” DOM. It’s a step that happens between the render function being called and the displaying of elements on the screen. This entire process is called reconciliation.

What is the difference between Shadow DOM and Virtual DOM?

The Shadow DOM is a browser technology designed primarily for scoping variables and CSS in web components. The Virtual DOM is a concept implemented by libraries in JavaScript on top of browser APIs.

What is React Fiber?

Fiber is the new reconciliation engine or reimplementation of the core algorithm in React v16. The goal of React Fiber is to increase its suitability for areas like animation, layout, gestures, ability to pause, abort, or reuse work and assign priority to different types of updates; and new concurrency primitives.

What is the main goal of React Fiber?

The goal of React Fiber is to increase its suitability for areas like animation, layout, and gestures. Its headline feature is incremental rendering: the ability to split rendering work into chunks and spread it out over multiple frames.

What are the controlled components?

A component that controls the input elements within the forms on subsequent user input is called Controlled Component, i.e, every state mutation will have an associated handler function.

For example, to write all the names in uppercase letters, we use handleChange as below,

handleChange(event) {



How to create props proxy for the HOC component?

You can add/edit props passed to the component using props proxy pattern like this:

function HOC(WrappedComponent) {

  return class Test extends Component {

    render() {

      const newProps = {

        title: 'New Header',

        footer: false,

        showFeatureX: false,

        showFeatureY: true


      return <WrappedComponent {...this.props} {...newProps} />




What is the context?

Context provides a way to pass data through the component tree without having to pass props down manually at every level. For example, authenticated user, locale preference, UI theme need to be accessed in the application by many components.

const {Provider, Consumer} = React.createContext(defaultValue)

What is a child prop?

Children are a prop (this.prop.children) that allow you to pass components as data to other components, just like any other prop you use. Component tree put between component’s opening and closing tag will be passed to that component as children prop.

There are a number of methods available in the React API to work with this prop. These include, React.Children.forEach, React.Children.count, React.Children.only, React.Children.toArray. A simple usage of children prop looks as below,


const MyDiv = React.createClass({

  render: function() {

    return <div>{this.props.children}</div>










What is reconciliation?

When a component’s props or state change, React decides whether an actual DOM update is necessary by comparing the newly returned element with the previously rendered one. When they are not equal, React will update the DOM. This process is called reconciliation.

How to set a state with a dynamic key name?

If you are using ES6 or the Babel transpiler to transform your JSX code then you can accomplish this with computed property names.


handleInputChange(event) {

  this.setState({ []: })



Why does React use className over class attribute?

class is a keyword in JavaScript, and JSX is an extension of JavaScript. That’s the principal reason why React uses className instead of class. Pass a string as the className prop.

render() {

  return <span className={'menu navigation-menu'}>{'Menu'}</span>


Why are fragments better than container divs?

  1. Fragments are a bit faster and use less memory by not creating an extra DOM node. This only has a real benefit on very large and deep trees.
  2. Some CSS mechanisms like Flexbox and CSS Grid have special parent-child relationships, and adding divs in the middle makes it hard to keep the desired layout.
  3. The DOM Inspector is less cluttered.


What are stateless components?

If the behavior is independent of its state then it can be a stateless component. You can use either a function or a class for creating stateless components. But unless you need to use a lifecycle hook in your components, you should go for function components. There are a lot of benefits if you decide to use function components here; they are easy to write, understand, and test, a little faster, and you can avoid this keyword altogether.

What are the advantages of React?

  1. Increases the application’s performance with Virtual DOM.
  2. JSX makes code easy to read and write.
  3. It renders both on client and server-side (SSR).
  4. Easy to integrate with frameworks (Angular, Backbone) since it is only a view library.
  5. Easy to write unit and integration tests with tools such as Jest.


What are the limitations of React?

  1. React is just a view library, not a full framework.
  2. There is a learning curve for beginners who are new to web development.
  3. Integrating React into a traditional MVC framework requires some additional configuration.
  4. The code complexity increases with inline templating and JSX.
  5. Too many smaller components leading to over-engineering or boilerplate.

How are error boundaries handled in React v15?

React v15 provided very basic support for error boundaries using the unstable_handleError method. It has been renamed to componentDidCatch in React v16.

What is the purpose of the render method of react-dom?

This method is used to render a React element into the DOM in the supplied container and return a reference to the component. If the React element was previously rendered into a container, it will perform an update on it and only mutate the DOM as necessary to reflect the latest changes.

ReactDOM.render(element, container[, callback])


If the optional callback is provided, it will be executed after the component is rendered or updated.

How to use innerHTML to React?

The dangerouslySetInnerHTML attribute is React’s replacement for using innerHTML in the browser DOM. Just like innerHTML, it is risky to use this attribute considering cross-site scripting (XSS) attacks. You just need to pass an __html object as key and HTML text as value.

In this example MyComponent uses dangerouslySetInnerHTML attribute for setting HTML markup:

function createMarkup() {

  return { __html: 'First &middot; Second' }


function MyComponent() {

  return <div dangerouslySetInnerHTML={createMarkup()} />


How events are different in React?

Handling events in React elements has some syntactic differences:

  1. React event handlers are named using camelCase, rather than lowercase.
  2. With JSX you pass a function as the event handler, rather than a string.

What will happen if you use setState() in the constructor?

When you use setState(), then apart from assigning to the object state React also re-renders the component and all its children. You would get an error like this: Can only update a mounted or mounting component. So we What will happen if you use setState() in the constructor? What will happen if you use setState() in the constructor? need to use this.state to initialize variables inside the constructor.

How do you conditionally render components?

In some cases, you want to render different components depending on some state. JSX does not render false or undefined, so you can use conditional short-circuiting to render a given part of your component only if a certain condition is true.

const MyComponent = ({ name, address }) => (



    {address &&





If you need an if-else condition then use a ternary operator.

const MyComponent = ({ name, address }) => (




      ? <p>{address}</p>

      : <p>{'Address is not available'}</p>





Spread the love

What is React JS?

React is a JavaScript library for building user interfaces. It is based on ES6 Script Extension. ES6 is ECMA Script 2015. React provides seamless manipulation and rendering of DOM objects.

We also consider it as a Popular JavaScript framework based on Redux Architecture. React is developed and maintained by Facebook Inc. React was first created by Jordan Walke, a software engineer working for Facebook. Facebook is using React since 2011 and Instagram since 2012.

It can be used to render UI for any type of device like Mobile, Desktop and tablets. React use JSX syntax to create dynamic HTML DOM objects. In JSX HTML is part of the Javascript code. JSX stands for JavaScript XML.JSX is an XML/HTML like extension to JavaScript.

According to Official

React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It lets you compose complex UIs from small and isolated pieces of code called “components”.

Reactjs Example:

A Simple Example of JSX:

const MyElement = <h1>Hello World!</h1>;

Features of React JS:

There is a number of features that React is Having. Let have a look at them:

Declarative views make your code more predictable and easier to debug. It renders and manipulates just the particular and right component when some change in data occurs and not the whole HTML page.

Break the whole Applications in a simple component. Each component is responsible for some particular rendering. This makes easy to maintain and make it modular. Simple component are used to make a complex and enrich UI. Since Component is written using ES6, we can separate state from DOM.

Example of Component :

class HelloWorld extends React.Component {
  render() {
		return (
			Hello {}
	<HelloWorld name="World" />,

#3.State Less and State Full Components:
React JS allow us to compose stateless and stateful component. Where we can decide to separate our DOM from the state. A simple stateless component can be used in the application to render the data from different states.

#4. Flexible
When it comes to flexibility, React gives freedom to the composer to create components, modules, and logic to make an application to work efficiently.

Plugins and components make it Extensible to any level. Users can create any number of Components and plugins as per convenient. It never restricts. We can use external plugins also.

#6.React Native
React has developed native libraries that are compatible with Android, iOS and UDP applications. So we can develop and deploy native applications for these Operating Systems.

#7.One-way data Flow:
In a React Js application, the components are not allowed to modify any property but can pass a call back function to do so. We can pass a set of values to the component to render the HTML with desired properties.

#8. Fast and Seamless Experience
All the above features make React Seamless and Fast. React provide a fast rendering of component because it renders only the right component where data has been changed.

Why We Should Choose React JS?

  • It is simple as an ES6 script.
  • Easy to learn and a huge community over the internet.
  • It has native libraries, so a single technology can work for mobile, and web applications.
  • It has one-way data binding.
  • It contains self- contained components.
  • Exceptional performance.
  • High flexibility, maintainability, and testability.

You have got a clear picture of React JS. What is React JS and what are the main features that let developers move towards it.

Spread the love

Code Igniter 4 Release Date

CodeIgniter is an open-source software rapid development web framework, for use in building dynamic web sites with PHP.

Codeigniter is a lightweight MVC architecture based PHP framework.

This is popular for its performance and zero configuration. Codeigniter has beautiful documentation. Since CI is the most flexible PHP MVC framework, people love to work on this.

CodeIgniter is loosely based on the popular model–view–controller (MVC) development pattern. While controller classes are a necessary part of development under CodeIgniter, models and views are optional.

CodeIgniter can be also modified to use the Hierarchical Model View Controller (HMVC) which allows the developers to maintain modular grouping of Controller, Models and View arranged in a sub-directory format.

Till now the biggest release of CodeIgniter is Codeigniter 4.0 or CI 4.0. A final release for the rewritten CodeIgniter 4.0 is live.

The first public version of CodeIgniter was released by EllisLab on February 28, 2006.

Developers all over the world were waiting for its release and on 24 Feb 2020, It was released.

Waiting time is over now the alpha is released by Code Igniter officials finally, last month.

The first stable version of CI 4 is CodeIgniter 4.0.0.

Key Features of Code Igniter 4.x:

  • High Performance MVC framework
  • Minimal Configuration as the earlier versions
  • HMVC Structure
  • Based on PHP 7.2 and ahead
  • An MVC framework with a small footprint
  • Highly secured and inbuilt CSRF protection for HTTP requests

Server Requirements for Code Igniter 4.x

PHP version 7.2 or higher is required, with the following extensions installed:

  • intl
  • libcurl if you plan to use the HTTP\CURLRequest library

Additionally, make sure that the following extensions are enabled in your PHP:

  • json (enabled by default – don’t turn it off)
  • xml (enabled by default – don’t turn it off)
  • mbstring
  • mysqlnd
Spread the love

PHP Send Emails

In this article, you will find the answer to the question “How to use PHP mail() function and how to send emails using PHP?

The mail() Function in PHP

Email is an important part of communication and frequently used by web applications to notify users about important events and actions.

When we register with some application we get an instant notification as Welcome Email.

Almost every website has a contact us page and there is a form with some fields.

Users use this form to communicate with customer care or for any inquiry or to get any Quotations.

We can use the PHP built-in mail() function for sending email messages to many recipients using PHP application.

We can send Plain text messages or HTML rich text messages with styled and multicolor design. In PHP mail() function is used as following:

mail(to, subject, message, headers, parameters);

The PHP mail() function has the following parameters:

Mandatory Parameters:
to: This email address of the recipient.
subject: Subject of the email to be sent.
message: This is the message body and main content of the email.

Optional Parameters:
headers: This is used to add headers such as “From”, “Cc”, “Bcc”.
parameters: This is used to add additional parameters.

Simple Mail Transmission Protocol (SMTP) Configuration:

PHP mailer uses the Simple Mail Transmission Protocol (SMTP) to send mail.
The SMTP settings would have already been configured.
The SMTP mail settings can be configured from “php.ini” file in the PHP installation folder.

Sending Plain Text Emails using mail() Function with Example:

We can send simple text messages using PHP mail() function. An example is given below:

Sending HTML Emails using mail() Function with Example:

We can send rich text styled HTML messages using PHP mail() function. An example is given below:

Spread the love

PHP Full Form

What is the Full Form of PHP?

PHP means Hypertext Preprocessor.

At the starting PHP was Personal Home Page, but later it is amended and popular as Hypertext Preprocessor.
As a server-side scripting language PHP can be easily embedded into HTML pages. PHP has a rich library and now it is improved as a full-fledged programming language. The latest stable version of PHP is PHP 7.2.

You can read more about New Features in PHP 7.2 here.

PHP is useful for small scale to many complex solutions as there is a number of frameworks, SMSs, and ECommerce are available.

Salient Features of PHP are as follows:

  • Server-side scripting language
  • Lightweight Programming language
  • Open-source
  • Supported by all the platforms
  • Written in C, so performance is good
  • Object-Oriented Programming Language
  • Supports many RDBMS like MySQL, PostgreSQL,Oracle,Sybase,Solid and NoSQL like MongoDB.
  • PHP provides a multilayer structure to enable security in System.


PHP along with MySQL is a beautiful combination of server-side scripting language and Open Source RDBMS. MySQL is largely used SQL based RDBMS. PHP has a library that supports MySQL functionality to call from PHP code. We can retrieve data, insert data. My SQL also supports Transaction in Database.

LAMP Server

LAMP is for Linux Apache MySQL and PHP. This is a combination of all the server needs and Database need to run a PHP application on Linux System. We can install LAMP on our Linux machine as a combination of all these four technologies.

WAMP Server

Just like LAMP, we have WAMP for Windows machine. WAMP means Windows, Apache, MySQL, and PHP. This combination provides us the accessibility and environment to run PHP and MySQL based application in a Windows machine.

Spread the love