Skip to main content

Openings for different technoogies.

Latest PHP Interview Questions

6) What is the difference between echo and print?

Main difference between echo() and print() is that echo is just an statement not a function and doesn't return's
value or it just prints a value whereas print() is an function which prints a value and also it returns value.
We cannot pass arguments to echo since it is just a statement whereas print is a function and we can pass
arguments to it and it returns true or false. print can be used as part of a more complex expression whereas
echo cannot. echo is marginally faster since it doesn't set a return value.

7) An examiner awards the highest mark 75 and the lowest mark 25, the pass marks being 40. The
moderator wants to change the highest mark to 250 and the lowest marks to 100 using the linear formula
y=ax+b. The revised pass marks will be:
A. 145
B. 150
C. 160
D. 400/3
Give the correct option.
y=ax+b
100=25a+b
250=75a+b
Solve it get and b and then put
y=40a+b
Answer: 145
8) A and B are shooters and having their exam. A and B fall short of 10 and 2 shots respectively to the
qualifying mark. If each of them fired at least one shot and even by adding their total score together, they fall
short of the qualifying mark, what is the qualifying mark?
Answer: 11
As A is short by 10 - he has shot 1
As B is short by 2 - he has shot 9
9+1=10 and 10 < 11

9) In objective test a correct answer score 4 marks and on a wrong answer 2 marks. A student scores 480
marks from 150 questions. How many answers were correct?
A. 120

B. 130
C. 110
D. 150
Answer: B i.e. 130
4x-2y=480
x+y=150
Then X is 130 so 130 is correct answer.

10) An INK bug starts jumping 1 meter to each direction north, south, east and west respectively. It marks a
point in the new locations. It comes back to its original point after jumping in all directions. It again starts the
same process from the newly drawn unique points. Totally how many points did the bug mark?

Comments

Popular posts from this blog

Openings for different technoogies.

 

What is the relation between Classes and Objects?

  They look very much same but are not same. A class is a definition, while an object is an instance of the class. A class is a blueprint while objects are actual objects existing in the real world. Suppose we have a class Person which has attributes and methods like name, age, height, weight, color etc. Class Person is just a prototype, now we can create real-time objects of class Person. #Example:   Ajay  is real time object of class  Person , which have name=Ajay, age=23, height=170cm, weight=60kg and color=black etc. Class A way to bind data and associated functions together. Class have many objects. Class is a template for creating objects. It is logical existence. Memory space is not allocated, when it is created. Definition (Declaration) is created once. Class is declared using "class" keyword. Object Basic runtime entity in object oriented environment. Object belongs to only class. Object are a implementation of class. It is physical existence. Memory space i...