Question
> f <- function(num) {
+ hello <- "Hello, world!\n"
+ for(i in seq_len(num)) {
+ cat(hello)
+ }
+ chars <- nchar(hello) * num
+ chars
+ }
> meaningoflife <- f(3)
> print(meaningoflife)
a.
32
b.
42
c.
52
d.
46
Posted under R Programming
Engage with the Community - Add Your Comment
Confused About the Answer? Ask for Details Here.
Know the Explanation? Add it Here.
Q. What will be the output of the following R code?
Similar Questions
Discover Related MCQs
Q. Point out the correct statement?
View solution
Q. The __________ function returns a list of all the formal arguments of a function.
View solution
Q. Point out the wrong statement?
View solution
Q. You can check to see whether an R object is NULL with the _________ function.
View solution
Q. Which of the following code will print NULL?
View solution
Q. R Commander is used to ___________ in R.
View solution
Q. Two vectors M and N are defined as M <- c(3, 2, 4) and N <- c(1, 2). What will be the output of vector Z that is defined as Z <- M*N.
View solution
Q. How missing values and impossible values are represented in R language?
View solution
Q. CRAN package ecosystem has more than ______ packages.
View solution
Q. Which function in R language is used to find out whether the means of 2 groups are equal to each other or not?
View solution
Q. __________ is the best way for communicating the results of data analysis using the R language.
View solution
Q. How many types of data structures does R language have?
View solution
Q. __________ is the easiest method for reshaping the data before analysis.
View solution
Q. ___________ function is used to apply an expression for a given dataset.
View solution
Q. __________ package is used to speed up data frame management code.
View solution
Q. Which package can be integrated with dplyr for large fast tables?
View solution
Q. In the base graphics system, which function is used to add elements to a plot?
View solution
Q. What are the different types of sorting algorithms available in R language?
View solution
Q. What is the command used to store R objects in a file?
View solution
Q. ___________ can be used for storing the data for long-term.
View solution
Suggested Topics
Are you eager to expand your knowledge beyond R Programming? We've curated a selection of related categories that you might find intriguing.
Click on the categories below to discover a wealth of MCQs and enrich your understanding of Computer Science. Happy exploring!