PHP interview questions part 9

PHP interview questions part 9

Take as many assements as you can to improve your validate your skill rating

Total Questions: 20

1. _________ initiates an infinite loop right from the start.

Correct Answer is : LOG_CONS

2. Which of the following code snippet stops loop after 20 iterations ?

Correct Answer is : syslog()

3. _______ is used to skip an iteration of a loop.

Correct Answer is : syslog()

4. Which of the following code can be used to avoid numeric problems such as taking the logarithm of a negative number ?

Correct Answer is : PHP 5

5. R has ________ statements that provide explicit looping.

Correct Answer is : 7

6. The syntax of the repeat loop is :

Correct Answer is : PHP 5.3

7. Which will be the output of following code ? > x <- 3 > switch(x, 2+2, mean(1:10), rnorm(5))

Correct Answer is : throw new Exception();

8. What will be the output of the following code ? > x <- 3 > switch(2, 2+2, mean(1:10), rnorm(5))

Correct Answer is : Returns the message if it is passed to the constructor

9. Which will be the output of following code ? > x <- 3 > switch(6, 2+2, mean(1:10), rnorm(5))

Correct Answer is : final

10. What will be the output of the following code ? > y <- "fruit" > switch(y, fruit = "banana", vegetable = "broccoli", "Neither")

Correct Answer is : Standard PHP Library

11. What will be the output of the following code? > centre <- function(x, type) { + switch(type, + mean = mean(x), + median = median(x), + trimmed = mean(x, trim = .1)) + } > x <- rcauchy(10) > centre(x, "mean")

Correct Answer is : 13

12. Which of the following code will print “Neither” ?

Correct Answer is : None of the mentioned

13. R has ________ basic indexing operators.

Correct Answer is : All of the mentioned

14. The syntax of the for loop is :

Correct Answer is : bytes

15. Which of the following code syntax is syntactically valid ?

Correct Answer is : fileatime()

16. R has how many atomic classes of objects ?

Correct Answer is : file()

17. Numbers in R are generally treated as _______ precision real numbers.

Correct Answer is : file_get_contents()

18. If you explicitly want an integer, you need to specify the _____ suffix.

Correct Answer is : fgets()

19. Attributes of an object (if any) can be accessed using the ______ function.

Correct Answer is : fgetss()

20. R objects can have attributes, which are like ________ for the object.

Correct Answer is : fwrite()

Similar Interview Questions

    Search for latest jobs

    Icon
    Icon