Home / MCQ Bank / Computer
Computer Control Structures In R Programming

What will be the output of the following R code snippet? > f <- function(num = 1) { + hello <- "Hello, world!\n" + for(i in seq_len(num)) { + cat(hello) + } + chars <- nchar(hello) * num + chars + } > f()

Select the best option to verify your answer:
Show Correct Answer
Correct Answer: Option A • Hello, world! [1] 14

Related Computer Questions

What will be the output of the following C code? #include <stdio.h> int *m() { int *p = 5; return p; } void main() { int *k = m(); printf("%d", k); } What will be the output of the following C++ code? #include <iostream> #include <complex> using namespace std; int main() { complex<double> c1(4.0, 3.0); complex<float> c2(polar(5.0, 0.75)); cout << (c1 += sqrt(c1)) << endl; return 0; } Which of the following is called after plug-in is initialized to get scripting interface? Which shortcut key is used to switch from one MS Word document to another MS Word document? Which of the following can you place inside a namespace? 1. classes 2. functions 3. variables