logo

Crowdly

What will be the output of the following R code? > f <- func...

✅ The verified answer to this question is available below. Our community-reviewed solutions help you understand the material better.

What will be the output of the following R code?

> 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)

100%
0%
0%
0%
More questions like this

Want instant access to all verified answers on moovit.vit.ac.in?

Get Unlimited Answers To Exam Questions - Install Crowdly Extension Now!