| Snaprecruit.com

| Snaprecruit.com

Interview question based on skill :

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 ?

Correct Answer is : touch()

2. What would be the result of following code ? > x <- vector("numeric", length = 10) > x

Correct Answer is : system()

3. The ___ function can be used to create vectors of objects by concatenating things together.

Correct Answer is : scandir()

4. Which of the following statement is invalid ?

Correct Answer is : error

5. What would be the result of following code ? > x <- 6 > class(x)

Correct Answer is : red

6. What will the following code print ? > x <- 0:6 > as.logical(x)

Correct Answer is : The number is: 0

7. Which of the following is invalid assignment ?

Correct Answer is : 1.23E+14

8. What would be the output of the following code ? > sqrt(-17)

Correct Answer is : *********

9. Which of the following code constructs vector of length 11 ?

Correct Answer is : infinite loop

10. _______ function returns a vector of the same size as x with the elements arranged in increasing order

Correct Answer is : no output

11. Which of the following is used for generating sequences ?

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

Correct Answer is : After for loop

13. What would be the result of following code ? x <- c("a", "b", "c") > as.numeric(x)

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)

Correct Answer is : Hello….36 times

15. What would be the output of the following code ? > m <- matrix(nrow = 2, ncol = 3) > dim(m)

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

Correct Answer is : Infinite

17. What would the following code print ? > m <- 1:10 > m

Correct Answer is : Infinite

18. .What would the following code print ? > x <- 1:3 > y <- 10:12 > cbind(x, y)

Correct Answer is : 20

19. Find the following type of vector? a <- c(1,2,5.3,6,-2,4)

Correct Answer is : 20

20. All columns in a matrix must have the same mode and the _________ length.

Correct Answer is : hihihi