JOBSEEKERS
Login
Sign Up
Jobseeker
Employer
Staffing Firm
Direct Client
PHP interview questions part 10
PHP interview questions part 10
Back
Take as many assements as you can to improve your validate your skill rating
Total Questions: 20
1. Which of the following can be considered as object attribute ?
A. sets()
B. set()
C. touch()
D. touched()
Show Correct Answer
Correct Answer is :
touch()
2. What would be the result of following code ? > x <- vector("numeric", length = 10) > x
A. out_cmm()
B. out_system()
C. cmm()
D. system()
Show Correct Answer
Correct Answer is :
system()
3. The ___ function can be used to create vectors of objects by concatenating things together.
A. scandir()
B. readdir()
C. scandirectory()
D. readdirectory()
Show Correct Answer
Correct Answer is :
scandir()
4. Which of the following statement is invalid ?
A. 0
B. infinite loop
C. no output
D. error
Show Correct Answer
Correct Answer is :
error
5. What would be the result of following code ? > x <- 6 > class(x)
A. red
B. red
C. no output
D. error
Show Correct Answer
Correct Answer is :
red
6. What will the following code print ? > x <- 0:6 > as.logical(x)
A. The number is: 0
B. The number is: 0
C. no output
D. error
Show Correct Answer
Correct Answer is :
The number is: 0
7. Which of the following is invalid assignment ?
A. 1.23E+14
B. 12345678910
C. 1.23E+12
D. infinite loop
Show Correct Answer
Correct Answer is :
1.23E+14
8. What would be the output of the following code ? > sqrt(-17)
A. **********
B. *********
C. ***********
D. infinite loop
Show Correct Answer
Correct Answer is :
*********
9. Which of the following code constructs vector of length 11 ?
A. 1.23E+14
B. 12345678910
C. 1.23E+12
D. infinite loop
Show Correct Answer
Correct Answer is :
infinite loop
10. _______ function returns a vector of the same size as x with the elements arranged in increasing order
A. -3-4-5
B. -3-4
C. infinite loop
D. no output
Show Correct Answer
Correct Answer is :
no output
11. Which of the following is used for generating sequences ?
A. In for loop
B. After for loop
C. In for loopAfter for loop
D. Infinite loop
Show Correct Answer
Correct Answer is :
In for loopAfter for loop
12. Which of the following statement would print “0” “1” “2” “3” “4” “5” “6” for the following code ? > x <- 0:6
A. In for loop
B. After for loop
C. In for loopAfter for loop
D. Infinite loop
Show Correct Answer
Correct Answer is :
After for loop
13. What would be the result of following code ? x <- c("a", "b", "c") > as.numeric(x)
A. In for loopIn for loopIn for loopIn for loop……infinitely
B. After for loopAfter for loopAfter for loop……..infinitely
C. In for loopAfter for loopIn for loopAfter for loopIn for loopAfter for loop…..infinitely
D. After for loop
Show Correct Answer
Correct Answer is :
In for loopIn for loopIn for loopIn for loop……infinitely
14. What would the following code print ? > x <- c("a", "b", "c") > as.logical(x)
A. Hello….36 times
B. Hello….45 times
C. Hello….50 times
D. Hello….40 times
Show Correct Answer
Correct Answer is :
Hello….36 times
15. What would be the output of the following code ? > m <- matrix(nrow = 2, ncol = 3) > dim(m)
A. Hello….36 times
B. Hello….45 times
C. Hello….50 times
D. Hello….40 times
Show Correct Answer
Correct Answer is :
Hello….36 times
16. What would be the output of the following code ? > m <- matrix(1:6, nrow = 2, ncol = 3) > m
A. Infinite
B. 123…….20
C. 1357…19
D. 13579…21
Show Correct Answer
Correct Answer is :
Infinite
17. What would the following code print ? > m <- 1:10 > m
A. Infinite
B. 123…….20
C. 1357…19
D. 13579…21
Show Correct Answer
Correct Answer is :
Infinite
18. .What would the following code print ? > x <- 1:3 > y <- 10:12 > cbind(x, y)
A. 20
B. 19
C. 12345678910….19
D. 12345678910….1920
Show Correct Answer
Correct Answer is :
20
19. Find the following type of vector? a <- c(1,2,5.3,6,-2,4)
A. 20
B. 19
C. 12345678910….19
D. 12345678910….1920
Show Correct Answer
Correct Answer is :
20
20. All columns in a matrix must have the same mode and the _________ length.
A. hihihi
B. hihellohihellohihello
C. hellohellohello
D. hi
Show Correct Answer
Correct Answer is :
hihihi
Similar Interview Questions
Search for latest jobs
Find Jobs