Showing posts with label Interview Questions and Answers. Show all posts
Showing posts with label Interview Questions and Answers. Show all posts

How can we echo the variable multiple times in PHP?

 The very simple PHP interview question always get asked to PHP Fresher in a job interview.



And the question you already see in a title is: How can we echo the variable multiple times in PHP?

Answer:

You can do it by multiple ways.

Example:

<?php

$my_variable = "echo me 7 times";

//how to echo the $my_variable 7 times

?>


Option 1:

echo it 7 times manually/individually as

<?php

$my_variable = "echo me 7 times";

echo $my_variable . "<br/>";

?>


Option 2:

Use for loop as:

<?php

$my_variable = "echo me 7 times";

for($i=0;$i<7;$i++){

  echo $my_variable . "<br/>";

}

?>


Option 3:

Use str_repeat() string function as:

<?php

$my_variable = "echo me 7 times";

echo str_repeat($my_variable , 7);

echo "<br/>";

?>

In this way you can print the variable multiple times in PHP. 

Now you can try above solutions on your machine or run PHP examples online.


Javascript Interview Questions asked to Fresher

Javascript Interview Questions asked to Fresher




Javascript Interview Questions for Freshers

Javascript interview questions with answers for Freshers

We are providing basic javascript interview questions with answers for freshers.
We will provide advance or more important javascript interview questions with answers for freshers in next post.

Keep visiting this blog daily for more updates: https://mytechnologypark.blogspot.com/

Question: What is JavaScript?
Answer:
JavaScript is a client-side as well as server side scripting language.
JavaScript is also an Object based Programming language.
Web pages are not the only place where JavaScript is used. Many desktop and server programs use JavaScript. Node.js is the best known.

Question: What is the difference between Java and JavaScript?
Answer:
JavaScript(JS) is not similar or related to Java.

Java is a complete programming language.
JavaScript is a coded program that can be introduced to HTML pages

Java is an OOP programming language while Java Script is an OOP scripting language.

Java creates applications that run in a virtual machine or browser while JavaScript code is run on a browser only.

Java code needs to be compiled while JavaScript code are all in text.

Question: What is the use of isNaN function?
Answer:
isNan function returns true if the argument is not a number otherwise it is false.


Question: Which company developed JavaScript?
Answer:
Netscape, the software company.



Question: What is 'this' keyword in JavaScript?
Answer:
'this' keyword refers to the object from where it was called.

Question: What is the use of type of operator?
Answer:
'typeof' is an operator which is used to return a string description of the type of a variable.

Question: Is JavaScript case sensitive?
Answer:
Yes

Why SEO is important for your web site?

Why SEO is important for your web site?

Because- Your competitors are doing it :-)



Importance of SEO

SEO can put you ahead of the competition. If two websites are selling the same thing, the search engine optimized website is more likely to have more customers and make more sales.

What is SEO?
It is a process to rank your website (Keywords) high in SERP so that your website can generate more traffic with the help of these queries or keywords.

SEO is not only about search engines but good SEO practices improve the user experience and usability of a website.



Benefits For doing SEO:

  • SEO pulls-in quality traffic 
  • People who find your website via SEO are warm traffic and easier to sell your solution to
  • SEO builds trust and credibility
  • SEO increases your brand awareness and equity
  • SEO makes your customers more informed
  • Web competition is increasing. SEO is essential for you to capture as much Google/Bing traffic as possible
  • SEO is a still low cost way to get traffic


Each business and administration sites require SEO to keep their position in the Google or other web index. It is SEO's obligations to keep site as leader in web crawlers.

Interview Question: Difference between Ruby and PHP


Interview Question with Answer
What are the difference between Ruby and PHP?


Difference between Ruby and PHP


Both Ruby and PHP languages are widely used. The websites of such well-known companies as Twitter, Hulu and Groupon are developed on Ruby. PHP is a language of Udemy, Wikipedia, and Facebook.
Difference between Ruby and PHP
Difference between Ruby and PHP


1. Ruby syntax is easy-to-comprehend, while PHP code may cause problems because of its syntax nature and standard library.

2. Statement terminator.
In Ruby, it is a newline character, in PHP – semicolon. For PHP, there is no secondary statement separator, while for Ruby it is a semicolon.

3. In PHP, blocks of code are ended with curly brackets, in Ruby – with the word ‘end’.

4. Integer data types. Ruby – no support, PHP supports 32-bit and 64-bit ones.

5. Frameworks.
Ruby – Cramping, Cramp, Ruby on Rails, Grape, Fiasco, Cuba. PHP – CakePHP, Codelgniter, Symfony, etc.


Most Important PHP Interview Questions and Answers

Most Important PHP Interview Questions and Answers




PHP Interview Questions and Answers
Question: 
What’s the difference between the include() and require() ?
Answer:
The Purpose of both is include() and require() is "to include a specific file"
The require() function is identical to include(), except that it handles errors differently. If an error occurs, the include() function generates a warning, but the script will continue execution. The require() generates a fatal error, and the script will stop.

Question: 
How can we get the IP address of the client?
Answer:
$_SERVER["REMOTE_ADDR"]; gives the IP address from which the request was sent to the web server

Question:
 Is multiple inheritance supported in PHP ?
Answer:
 NO, multiple inheritance is not supported by PHP

Question: 
What is the difference between unset and unlink ?
Answer:
 unlink is used to remove/delete files.
 unset is used to unset a variable

How to Prepare for interview of PHP developer?

As we have received many requests for writing article for How to Prepare for interview of PHP developer?

We can not give complete guidance in one article here but we will try to give enough information regarding How to Prepare for interview of PHP developer.




To become PHP developer means to get a job as a PHP developer or PHP programmer or Web Developer you must have at least bachelor degree. Many companies prefer the Qualification criteria as:
BCA, BSC-IT, BSC-Computers, MCA, MCM, BE-IT.

If you are not having any of the above degree but you are having enough practical knowledge of PHP then some of the small companies can hire you as a PHP Developer.

Coming to the preparation for the PHP Developer Job  ( How to get a job as PHP Developer )
 First and most important part is Build your Resume properly. Resume is the entry point for you. If your Resume is not good then you may loss the opportunity to enter into IT industry.

So, what means Good Resume?
Here we provide Best Resume Tips for Freshers.
Please go through the following links to build a best Resume:
Resume Tips For Freshers - 1

Resume Tips For Freshers - 2

Next, Prepare for PHP Interview Questions.
You must have basic knowledge of all the basic concepts of PHP.




Here I am providing some of them:

What is WAMP / XAMPP?

PHP Variables - 1
PHP Variables - 2

GET method and POST method in PHP

How to Include File in PHP

Arrays in PHP

Types of array in PHP

Array functions in PHP

For Loop in PHP with Example

Errors in PHP, Types of Errors in PHP

String Functions in PHP

Form attributes

How to upload file in PHP?

File Operations in PHP?

Session and Cookies in PHP

Difference between unlink and unset in PHP

How to send mail using PHP?

explode function in php

MySQL functions to create connection, insert , update, delete.

Database connection using PHP MySqli


Basic Concepts of Javascript

Basic PHP programs in PHP:
PHP program to check whether the given number is palindrome or not
PHP program to check whether the given number is prime or not

Here we are providing all PHP Interview Questions with Answers
PHP Interview Questions with Answers
All PHP Interview Questions with Answers
Important PHP Interview Questions with Answers

Here we are providing some important HR interview questions with Answers:
Tell me about Yourself
How long would you stay with us? HR Interview Question


In this way we have tried our best to give you a guidance regarding How to Preppare for interview of PHP developer.

We will be writing most important content on this blog for BCA Freshers and MCA freshers regarding Resume Tips, Interview Questions, Technical Concepts explanation with very easy language.




Share this Post with your Friends.
Help people, people will help you!

Related Post - Top PHP frameworks used for Web Development

PHP Interview questions with answers for Freshers - 1

Many interview questions we already listed on this blog, please read through out the posts related to PHP interview questions.


Q. What is the use of "echo" in php?
Answer: It is used to print a data in the webpage,
Example: <?php echo 'Welcome to Technology Park'; ?>
It will print the output or text on webpage as:
Welcome to Technology Park

Q. How to include a file to a php page?
VERY IMPORTANT INTERVIEW QUESTION
Answer: We can include a file using "include() " or "require()" function with file path as its parameter.

Q. How stop the execution of a php scrip ?
Answer: exit() function is used to stop the execution of a page.
At any point of script you can use the exit or exit() statement.

example:
<?php
echo "Welcome to Technology Park";
exit();
echo "not printed";
?>

Output:
Welcome to Technology Park

Q. How do you define a constant?
Answer:Using define() directive, like define ("MYCONSTANT",150)


Keep visiting the blog regularly for Latest Interview questions and Resume Tips.

DBMS interview questions with answers

For FRESHERS:
DBMS interview questions with answers



Question: What is database?
A database is a logically coherent collection of data with some inherent meaning, representing some aspect of real world and which is designed, built and populated with data for a specific purpose.

Question: What is DBMS?
It is a collection of programs that enables user to create and maintain a database. In other words it is general-purpose software that provides the users with the processes of defining, constructing and manipulating the database for various applications.

Question: What is a Database system?
The database and DBMS software together is called as Database system.

Question: What are the advantages of DBMS?
Redundancy is controlled.
Unauthorized access is restricted.
Providing multiple user interfaces.
Enforcing integrity constraints.
Providing backup and recovery.

Question: What are the disadvantage in File Processing System?
Data redundancy and inconsistency.
Difficult in accessing data.
Data isolation.
Data integrity.
Concurrent access is not possible.
Security Problems.

Question: Describe the three levels of data abstraction?
The are three levels of abstraction:
Physical level: The lowest level of abstraction describes how data are stored.
Logical level: The next higher level of abstraction, describes what data are stored in database and what relationship among those data.
View level: The highest level of abstraction describes only part of entire database.

Question: What is Object Oriented model?
This model is based on collection of objects. An object contains values stored in instance variables with in the object. An object also contains bodies of code that operate on the object. These bodies of code are called methods. Objects that contain same types of values and the same methods are grouped together into classes.




For Interview questions and answers read these posts:

Most Important iOS Interview Questions:

Tell me about Yourself

50 Important C Language Interview Questions with Answers


Important PHP interview questions for freshers











MOST IMPORTANT INTERVIEW QUESTIONS PHP

QUESTION. How to include a file to a php page?
Answer. We can include a file using "include() " or "require()" function with file path as its parameter.

QUESTION. What is difference between “include” and “require” in php?
Answer. The include and require statements are identical, except upon failure:

require will produce a fatal error (E_COMPILE_ERROR) and stop the script
include will only produce a warning (E_WARNING) and the script will continue

QUESTION:  What are the different errors in PHP?
Answer. There are 4 basically types of error.
Parse Error – Commonly caused due to syntax mistakes in codes e.g. missing semicolon, mismatch brackets.
Fatal Error – These are basically run time errors which are caused when you try to access what can’t be done. E.g. accessing a dead object, or trying to use a function that hasn’t been declared.
Warning Error – These occurs when u try to include a file that is not present, or delete a file that is not on the server. This will not halt the script; it will give the notice and continue with the next line of the script.
Notice Error – These errors occurs when u try to use a variable that hasn’t been declared, this will not halt the script, It will give the notice and continue with the next line of the script.

QUESTION: What is session and why do we use it?
Answer. Session is a super global variable that preserve data across subsequent pages. Session uniquely defines each user with a session ID, so it helps making customized web application where user tracking is needed.

QUESTION: What is cookie and why do we use it?
Answer. Cookie is a small piece of information stored in client browser. It is a technique used to identify a user using the information stored in their browser (if already visited that website) . Using PHP we can both set and get COOKIE.

To read all PHP interview questions click here.









OOPs Questions with Answers: Important for Interview


Q. Which of the following is not a type of constructor?

A. Copy constructor
B. Friend constructor
C. Default constructor
D. Parameterized constructor



Q. Which of the following type of class allows only one object of it to be created?

A. Virtual class
B. Abstract class
C. Singleton class
D. Friend class


Q. Which of the following concepts means waiting until runtime to determine which function to call?

A. Data hiding
B. Dynamic casting
C. Dynamic binding
D. Dynamic loading


Q. How "Late binding" is implemented in C++?

A. Using C++ tables
B. Using Virtual tables
C. Using Indexed virtual tables
D. Using polymorphic tables


Q. Which of the following is correct about class and structure?

A. class can have member functions while structure cannot.
B. class data members are public by default while that of structure are private.
C. Pointer to structure or classes cannot be declared.
D. class data members are private by default while that of structure are public by default.


Q. Which of the following concepts means determining at runtime what method to invoke?

A. Data hiding
B. Dynamic Typing
C. Dynamic binding
D. Dynamic loading


Q. Which of the following is an invalid visibility label while inheriting a class?

A. public
B. private
C. protected
D. friend



Most Important ASP.NET questions with answers

Q.: Explain the advantages of ASP.NET.
Answer:
Following are the advantages of ASP.NET.

Web application exists in compiled form on the server so the execution speed is faster as compared to the interpreted scripts.

ASP.NET makes development simpler and easier to maintain with an event-driven, server-side programming model.

Being part of .Framework, it has access to all the features of .Net Framework.

Content and program logic are separated which reduces the inconveniences of program maintenance.

ASP.NET makes for easy deployment. There is no need to register components because the configuration information is built-in.

To develop program logic, a developer can choose to write their code in more than 25 .Net languages including VB.Net, C#, JScript.Net etc.

Introduction of view state helps in maintaining state of the controls automatically between the postbacks events.

ASP.NET offers built-in security features through windows authentication or other authentication methods.

Integrated with ADO.NET.

Built-in caching features.





Q. Explain the different parts that constitute ASP.NET application.
Answer:
Content, program logic and configuration file constitute an ASP.NET application.

Content files
Content files include static text, images and can include elements from database.

Program logic
Program logic files exist as DLL file on the server that responds to the user actions.

Configuration file
Configuration file offers various settings that determine how the application runs on the server.

Q. Describe the sequence of action takes place on the server when ASP.NET application starts first time
Answer:
Following are the sequences:

IIS starts ASP.NET worker process - worker process loads assembly in the memory - IIS sends the request to the assembly - the assembly composes a response using program logic - IIS returns the response to the user in the form of HTML.
5. Explain the components of web form in ASP.NET
Answer:
Server controls
The server controls are Hypertext Markup Language (HTML) elements that include a runat=server attribute. They provide automatic state management and server-side events and respond to the user events by executing event handler on the server.

HTML controls
These controls also respond to the user events but the events processing happen on the client machine.

Data controls
Data controls allow to connect to the database, execute command and retrieve data from database.

System components
System components provide access to system-level events that occur on the server.





Q. Describe in brief .NET Framework and its components.
Answer:
.NET Framework provides platform for developing windows and web software. ASP.NET is a part of .Net framework and can access all features implemented within it that was formerly available only through windows API. .NET Framework sits in between our application programs and operating system.

The .Net Framework has two main components:

.Net Framework Class Library: It provides common types such as data types and object types that can be shared by all .Net compliant language.

The Common language Runtime: It provides services like type safety, security, code execution, thread management, interoperability services.





LIKE: TECHNOLOGY PARK

What is HTTP?

What is HTTP?

(Interview question for web developer)
Answer:
The Hypertext Transfer Protocol (HTTP) is designed to enable communications between clients and servers.

HTTP works as a request-response protocol between a client and server.

A web browser may be the client, and an application on a computer that hosts a web site may be the server.

Example: A client (browser) submits an HTTP request to the server; then the server returns a response to the client. The response contains status information about the request and may also contain the requested content.






C++ QUESTION: RunTime Polymorphism is achieved by

C++ QUESTION - RunTime Polymorphism is achieved by ______

-friend function -virtual function -operator overloading -function overloading

ANSWER:

-virtual function



What is the difference between unlink and unset in php?

PHP INTERVIEW QUESTION:
What is the difference between unlink and unset in php?
Answer:
Unlink is used to delete the file used in the context.
Unset is used to unset or destroy the variable.



For image work which library is used in php?

For image work which library is used in php?

It is the interview question for PHP Developer.

Answer:

GD library




The GD library is included by default since PHP 4.3 so you will probably be able to use it in your project in most server environments.





Write a c++ program to find sum and average of two numbers.

Write a c++ program to find sum  and average of two numbers.
This question always asked in Technical Interview.




#include <iostream.h>
#include <conio.h>

void main()
{
clrscr();

int x,y,sum;
float average;
cout << "Enter 2 integers : " << endl;
cin>>x>>y;
sum=x+y;
average=sum/2;
cout << "sum="<< sum << "." << endl;
cout << "average=" << average << "." << endl;

getch();

}


SAMPLE INPUT:
Enter 2 integers :
8 6

SAMPLE OUTPUT:
sum=14.
average=7.






Write a C++ program to print a pattern :

Write a C++ program to print a pattern :
1
1 2
1 2 3
1 2 3 4
1 2 3 4 5

This question always asked in Technical Interview.






Program:


#include<iostream.h>
#include<conio.h>
void main()
{
clrscr();
int i,j;

for(i=1;i<=5;i++)
{
for(j=1;j<=i;j++)
{

cout<<j<<" ";
}
cout<<"\n";
}
getch();
}


output:

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5




Basic Networking Interview Questions and answers

Basic Networking Interview Questions and answers:







Question:
1.
How long is an IPv6 address?

A. 32 bits
B. 128 bytes
C. 64 bits
D. 128 bits

Answer: D

Question:
2.
What is the main reason the OSI model was created?

A. To create a layered model larger than the DoD model.
B. So application developers can change only one layer's protocols at a time.
C. So different networks could communicate.
D. So Cisco could use the model.

Answer: C

Question:
3.
Which protocol does Ping use?

A. TCP
B. ARP
C. ICMP
D. BootP

Answer: C

Explanation:

ICMP is the protocol at the Network layer that is used to send echo requests and replies.








TECHNOLOGY PARK is trying to update all important interview questions with answers.

Basic Preparation for Technical interview

You should prepare the following topics for technical interview.




Database

-queries
-joins
-primary key, unique key, referenclese key
-triggers
-procedures

Basic programms of C++/C

-prime number
-palindrom number
-armstrong number
-factorial
-sum of first 10 numbers
-print pattern

*
**
***
****

or

1
12
123
1234
12345

- be ready for puzzles
- printf(), scanf()
- inheritance, polymorphism, abstraction, data hiding
- class and objects
- constructor, destructor
- database operations, like insert, update, delete





Important:

Be confident while answering.

How to Make a Link Open in a New Tab Using HTML

The Question asked in Technical Interview for BCA/MCA Freshers:

How to Make a Link Open in a New Tab Using HTML

The basic code for any link is:

< a href=”somepage.html”> Go To somepage</a >

To Open specified link in new tab, your code should look something like this:

< a href=”somepage.html” target=”_blank”> Go To somepage</a >

By setting the target attribute as _blank, we are able to open a link in new tab.

Note: For More Interview Questions and Resume Tips visit this website daily.

We will upload most important interview questions, technical interview questions for BCA and MCA freshers.

This blog is for:
BCA MCA Freshers, Software Companies, IT Students, Training Institutes, Colleges, Teachers, Learners, Leaders, Earners,...





: for more details or any query email us: hellotechnologypark@gmail.com